Skip to content

Commit 500adfe

Browse files
authored
Complete the publish pipeline (#372)
1 parent 79669b2 commit 500adfe

1 file changed

Lines changed: 35 additions & 3 deletions

File tree

.circleci/config.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,29 @@ jobs:
169169
root: ./
170170
paths:
171171
- ./dist
172+
publish_release:
173+
executor: base
174+
environment:
175+
GITHUB_TOKEN: "${GITHUB_TOKEN}"
176+
steps:
177+
- attach_workspace:
178+
at: ./
179+
- run:
180+
name: Install GitHub CLI
181+
command: |
182+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
183+
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
184+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
185+
sudo apt update
186+
sudo apt install gh
187+
- run:
188+
name: Create and upload release
189+
command: |
190+
gh release create "${CIRCLE_TAG}" ./dist/* \
191+
--repo "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \
192+
--title "${CIRCLE_TAG}" \
193+
--notes "Release ${CIRCLE_TAG}" \
194+
--verify-tag
172195
publish_docker_images:
173196
executor: base
174197
environment:
@@ -254,19 +277,28 @@ workflows:
254277
filters:
255278
tags:
256279
only: /.*/
257-
- publish_docker_images:
280+
- publish_release:
258281
requires:
259282
- check_whitespace
260283
- check_bash
261284
- check_frontend
262285
- test_go
263286
- lint_sql
264287
- build_backend
288+
- package_release
265289
filters:
290+
tags:
291+
only: /[0-9]+(\.[0-9]+){2}/
266292
branches:
267-
only: master
293+
ignore: /.*/
294+
- publish_docker_images:
295+
requires:
296+
- package_release
297+
filters:
268298
tags:
269-
only: /.*/
299+
only: /[0-9]+(\.[0-9]+){2}/
300+
branches:
301+
ignore: /.*/
270302
- deploy:
271303
requires:
272304
- check_whitespace

0 commit comments

Comments
 (0)