Skip to content

Commit

Permalink
Derive pack version from branch name
Browse files Browse the repository at this point in the history
Note, for pull requests the branch name is the source branch, not the target.
Thus for PRs the pack version will be 0.0.0.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano authored and jromero committed Apr 10, 2020
1 parent 77d5cd3 commit 6634a99
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ jobs:
run: make verify
- name: Test
run: make test
- name: Derive pack version from branch name
run: |
[[ $GITHUB_REF =~ ^refs\/heads\/release/(.*)$ ]] && version=${BASH_REMATCH[1]} || version=0.0.0
echo "::set-env name=PACK_VERSION::$version"
shell: bash
- name: Build
run: make build
env:
Expand Down

0 comments on commit 6634a99

Please sign in to comment.