@@ -10,31 +10,31 @@ outputs:
1010runs :
1111 using : " composite"
1212 steps :
13- - name : get interpreter
14- shell : bash
15- id : get-interpreter
16- run : |
17- if [[ $RUNNER_OS == 'macOS' ]]; then
18- interpreter='zsh {0}'
19- else
20- interpreter=bash
21- fi
22- echo "interpreter=$interpreter" >> "$GITHUB_OUTPUT"
13+ - name : get interpreter
14+ shell : bash
15+ id : get-interpreter
16+ run : |
17+ if [[ $RUNNER_OS == 'macOS' ]]; then
18+ interpreter='zsh {0}'
19+ else
20+ interpreter=bash
21+ fi
22+ echo "interpreter=$interpreter" >> "$GITHUB_OUTPUT"
2323
24- - name : Get version
25- shell : ${{ steps.get-interpreter.outputs.interpreter }}
26- id : get-version
27- env :
28- RELEASE_TAG : ${{ github.event.release.tag_name }}
29- run : |
30- # get the Build Bumber & version from git
31- VERSION="$(cat VERSION)"
32- BUILD_NUMBER="$(git rev-list HEAD --count)"
33- # Gets the release tag from github if it exists (Github Actions)
34- # Assumes tags start with V
35- if [[ -v RELEASE_TAG ]] && [[ -n $RELEASE_TAG ]]; then
36- TAG="${RELEASE_TAG,,}"
37- VERSION="${TAG//"v"}"
38- fi
39- echo "BUILD_NUMBER=$BUILD_NUMBER" >> "$GITHUB_OUTPUT"
40- echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
24+ - name : Get version
25+ shell : ${{ steps.get-interpreter.outputs.interpreter }}
26+ id : get-version
27+ env :
28+ RELEASE_TAG : ${{ github.event.release.tag_name }}
29+ run : |
30+ # get the Build Bumber & version from git
31+ VERSION="$(cat VERSION | egrep -o '[0-9.]+' )"
32+ BUILD_NUMBER="$(git rev-list HEAD --count)"
33+ # Gets the release tag from github if it exists (Github Actions)
34+ # Assumes tags start with V
35+ if [[ -v RELEASE_TAG ]] && [[ -n $RELEASE_TAG ]]; then
36+ TAG="${RELEASE_TAG,,}"
37+ VERSION="${TAG//"v"}"
38+ fi
39+ echo "BUILD_NUMBER=$BUILD_NUMBER" >> "$GITHUB_OUTPUT"
40+ echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
0 commit comments