diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c75a3d271..01aa879f68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,14 @@ jobs: # - run: ./scripts/release/dev_center_docs # - store_artifacts: # path: /tmp/heroku-cli-commands-test.md + snap: + docker: + - image: snapcore/snapcraft:stable + environment: + LC_ALL: C.UTF-8 + steps: + - checkout + - run: ./scripts/snap workflows: version: 2 heroku_cli: @@ -115,3 +123,13 @@ workflows: ignore: /.*/ tags: only: /^v.*/ + nightly: + triggers: + - schedule: + cron: "0 14 * * *" + filters: + branches: + only: + - master + jobs: + - snap diff --git a/scripts/snap b/scripts/snap new file mode 100755 index 0000000000..d58ef8f0f6 --- /dev/null +++ b/scripts/snap @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -eux + +mkdir -p ~/.config/snapcraft +set +x && echo "$SNAPCRAFT_MACAROON" | base64 --decode > ~/.config/snapcraft/snapcraft.cfg && set -x + +LATEST_64=$(snapcraft list-revisions heroku --arch amd64 | grep -v git | head -n 2 | tail -n 1 | awk '{print $1}') +snapcraft release heroku "$LATEST_64" beta +snapcraft release heroku "$LATEST_64" candidate +snapcraft release heroku "$LATEST_64" stable + +LATEST_ARM=$(snapcraft list-revisions heroku --arch armhf | grep -v git | head -n 2 | tail -n 1 | awk '{print $1}') +snapcraft release heroku "$LATEST_ARM" beta +snapcraft release heroku "$LATEST_ARM" candidate +snapcraft release heroku "$LATEST_ARM" stable