diff --git a/.circleci/config.yml b/.circleci/config.yml index 59c9ab0cc2a3..0bad7067d7cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -172,7 +172,7 @@ jobs: - run: | git clone https://github.com/crystal-lang/distribution-scripts.git ~/distribution-scripts cd ~/distribution-scripts - git checkout cb8f2c51a042609d7c45707ba8369b37d011037f + git checkout 44172615fa196fb8592046582471fdfc8d69472c # persist relevant information for build process - run: | cd ~/distribution-scripts @@ -225,12 +225,17 @@ jobs: steps: - attach_workspace: at: /tmp/workspace + - checkout + - run: | + # We need CRYSTAL_VERSION in prepare_nightly to use src/VERSION so we publish them as x.y.z-dev in apt/rpm + # + # How to brand it + echo "export CRYSTAL_VERSION=$(cat src/VERSION)" >> /tmp/workspace/distribution-scripts/build.env + # + # TODO: We might want to do that on docker images also to support updates on multiple development versions the same date. - run: | cd /tmp/workspace/distribution-scripts - # How to brand it - export VERSION=nightly-$(date '+%Y%m%d') - echo "export CRYSTAL_VERSION=$VERSION" >> build.env echo "export DOCKER_TAG=nightly" >> build.env # Build from working directory (needed for omnibus and when version does not match branch/tag) @@ -358,6 +363,24 @@ jobs: paths: - build + dist_bintray_nightly: + machine: true + steps: + - attach_workspace: + at: /tmp/workspace + - run: + no_output_timeout: 20m + command: | + cd /tmp/workspace/distribution-scripts + source build.env + cd bintray + ./publish-nightly.sh $CRYSTAL_VERSION $(date '+%Y-%m-%d') \ + /tmp/workspace/build/crystal-*-linux-x86_64.tar.gz \ + /tmp/workspace/build/crystal-*-linux-i686.tar.gz + - store_artifacts: + path: /tmp/workspace/distribution-scripts/bintray/build/unsigned + destination: unsigned + dist_docker: machine: true steps: @@ -522,6 +545,7 @@ workflows: branches: ignore: - /release\/.+/ + - /package\/.+/ - /.*\bci\b.*/ - test_linux32_std: filters: *unless_maintenance @@ -644,6 +668,10 @@ workflows: - dist_darwin: requires: - prepare_nightly + - dist_bintray_nightly: + requires: + - dist_linux + - dist_linux32 - dist_docker: requires: - dist_linux @@ -752,3 +780,33 @@ workflows: - dist_darwin - dist_snap - dist_docs + + package_build: + jobs: + - prepare_common: + filters: &package + branches: + only: + - /package\/.+/ + - prepare_maintenance: + filters: *package + requires: + - prepare_common + - dist_linux: + filters: *package + requires: + - prepare_maintenance + - dist_linux32: + filters: *package + requires: + - prepare_maintenance + - dist_darwin: + filters: *package + requires: + - prepare_maintenance + - dist_artifacts: + filters: *package + requires: + - dist_linux + - dist_linux32 + - dist_darwin