File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 2929 always-auth : true
3030 cache : ' yarn'
3131
32+ - name : Set version
33+ run : |
34+ case ${{ github.event_name }} in
35+ release)
36+ VERSION="${{ github.event.release.tag_name }}"
37+ yarn version --no-git-tag-version --new-version "${VERSION#v}"
38+ ;;
39+ pull_request)
40+ VERSION=$(git describe --tags | grep -Eo 'v[0-9]+\.[0-9]+\.[0-9]+')
41+ QUALIFIER=$(git describe --tags | grep -Eo '-g[0-9a-f]+$')
42+ yarn version -s --no-git-tag-version --new-version "${VERSION#v}"
43+ yarn version --no-git-tag-version --prepatch --preid "pr${{ github.event.number }}${QUALIFIER}"
44+ ;;
45+ *)
46+ VERSION=$(git describe --tags | grep -Eo 'v[0-9]+\.[0-9]+\.[0-9]+')
47+ QUALIFIER=$(git describe --tags | grep -Eo '[0-9]+\-g[0-9a-f]+$')
48+ yarn version -s --no-git-tag-version --new-version "${VERSION#v}"
49+ yarn version --no-git-tag-version --prepatch --preid "${{ github.ref_name }}${QUALIFIER}"
50+ ;;
51+ esac
52+
3253 - name : Build
3354 env :
3455 GITHUB_TOKEN : ${{github.token}}
You can’t perform that action at this time.
0 commit comments