diff --git a/.circleci/config.yml b/.circleci/config.yml index 32fb0abc..3be073c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,6 +70,7 @@ jobs: root: app/ paths: - build/* + - micropad.tar.xz deploy: docker: @@ -84,12 +85,40 @@ jobs: - run: rsync -aue "ssh -p 1276 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" app/build/* $SSH_PATH + publish-github-release: + docker: + - image: cibuilds/github:0.12 + + steps: + - attach_workspace: + at: ~/repo/app + - run: + name: "Publish Release on GitHub" + command: | + VERSION=${CIRCLE_TAG} + ghr -t ${GH_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ~/repo/app/micropad.tar.xz + workflows: version: 2 test-and-deploy: jobs: - - test - - build + - test: + filters: + tags: + only: /^v.*/ + - build: + filters: + tags: + only: /^v.*/ + - publish-github-release: + requires: + - test + - build + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ - deploy: requires: - test