File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments