Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto publish gh release on version tag #331

Merged
merged 2 commits into from
Nov 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:

steps:
- setup
- checkout
stefan-guggisberg marked this conversation as resolved.
Show resolved Hide resolved

# run tests!
- run: mkdir junit
Expand Down Expand Up @@ -120,6 +121,24 @@ jobs:
working_directory: build
- store_artifacts:
path: build/hlx_install.sh
- persist_to_workspace:
# save to workspace for downstream jobs
root: ./build
paths:
- hlx_install.sh

github-release:
# https://circleci.com/blog/publishing-to-github-releases-via-circleci/
docker:
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: ./build
- run:
name: "Publish Release on GitHub"
command: |
CHANGELOG="**Changes**\n\nTODO list resolved issues"
ghr -t ${GITHUB_API_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -n ${CIRCLE_TAG} -b ${CHANGES} -delete ${CIRCLE_TAG} ./build/

workflows:
version: 2
Expand All @@ -137,3 +156,24 @@ workflows:
filters:
branches:
only: master

build-and-release:
jobs:
- build:
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
- installer:
requires:
- build
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
- github-release:
requires:
- installer
filters:
branches:
ignore: /.*/
tags:
only: /^v\d+\.\d+\.\d+$/