From eb08955f4eca2df7c64f24e1cc7122cf1445567b Mon Sep 17 00:00:00 2001 From: Nick Webster Date: Mon, 7 Jan 2019 23:44:10 +1300 Subject: [PATCH 1/6] Added a publish github release job to the CI --- .circleci/config.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 32fb0abc..67e02553 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,12 +84,34 @@ 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} micropad.tar.xz + workflows: version: 2 test-and-deploy: jobs: - test - build + - publish-github-release: + requires: + - test + - build + filters: + branches: + only: master + tags: + only: /^v.*/ - deploy: requires: - test From 501f63e2bfe1796362ca9dbfed7c827a4de5467d Mon Sep 17 00:00:00 2001 From: Nick Webster Date: Mon, 7 Jan 2019 23:50:27 +1300 Subject: [PATCH 2/6] Rearranging filter order for the publish build --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 67e02553..119158d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,10 +108,10 @@ workflows: - test - build filters: - branches: - only: master tags: only: /^v.*/ + branches: + only: master - deploy: requires: - test From ea8004c1c401ca2e23f00e8221d7881ab1297251 Mon Sep 17 00:00:00 2001 From: Nick Webster Date: Mon, 7 Jan 2019 23:51:56 +1300 Subject: [PATCH 3/6] Ignore all branches for publishing --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 119158d5..3a0aa813 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,7 +111,7 @@ workflows: tags: only: /^v.*/ branches: - only: master + ignore: /.*/ - deploy: requires: - test From 4d4c573867327b71453272736b13a8aa36e535cf Mon Sep 17 00:00:00 2001 From: Nick Webster Date: Mon, 7 Jan 2019 23:59:14 +1300 Subject: [PATCH 4/6] Build on tag --- .circleci/config.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a0aa813..7f247c44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -101,8 +101,14 @@ workflows: version: 2 test-and-deploy: jobs: - - test - - build + - test: + filters: + tags: + only: /^v.*/ + - build: + filters: + tags: + only: /^v.*/ - publish-github-release: requires: - test From 84926b68e90ed0b327454255ec4d5907eb1c910c Mon Sep 17 00:00:00 2001 From: Nick Webster Date: Tue, 8 Jan 2019 00:02:19 +1300 Subject: [PATCH 5/6] Fixing path --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f247c44..cbbcc3ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,7 +95,7 @@ jobs: 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} micropad.tar.xz + 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 From 746861a897ee152298118f09a57f309e0fd8b0a8 Mon Sep 17 00:00:00 2001 From: Nick Webster Date: Tue, 8 Jan 2019 00:08:15 +1300 Subject: [PATCH 6/6] Persist app bundle --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index cbbcc3ec..3be073c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,6 +70,7 @@ jobs: root: app/ paths: - build/* + - micropad.tar.xz deploy: docker: