File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : " Bump"
2+
3+ on :
4+ workflow_run :
5+ workflows :
6+ - " Publish"
7+ types :
8+ - completed
9+ branches :
10+ - " master"
11+ - " master-2"
12+ - " master-beta"
13+
14+ concurrency :
15+ group : bump-${{ github.event.workflow_run.head_branch }}
16+ cancel-in-progress : false
17+
18+ jobs :
19+ bump :
20+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
21+ name : " Bump Version"
22+ timeout-minutes : 60
23+ runs-on : ubuntu-latest
24+ permissions :
25+ contents : write
26+ steps :
27+ - name : " Checkout source code"
28+ uses : actions/checkout@v4
29+ with :
30+ ref : ${{ github.event.workflow_run.head_branch }}
31+ fetch-depth : 0
32+ token : ${{ github.token }}
33+
34+ - name : " Bump version"
35+ uses : phips28/gh-action-bump-version@v11.0.7
36+ env :
37+ GITHUB_TOKEN : ${{ github.token }}
38+ with :
39+ default : " ${{ (github.event.workflow_run.head_branch == 'master-2' || github.event.workflow_run.head_branch == 'master-beta') && 'prerelease' || 'minor' }}"
40+ preid : " ${{ github.event.workflow_run.head_branch == 'master-2' && 'alpha' || (github.event.workflow_run.head_branch == 'master-beta' && 'beta' || '') }}"
41+ tag-prefix : " release-"
42+ bump-policy : last-commit
43+ check-last-commit-only : true
44+ target-branch : ${{ github.event.workflow_run.head_branch }}
45+ commit-message : " ci: version bump to {{version}} [skip ci]"
Original file line number Diff line number Diff line change 11name : " Publish"
22
33on :
4- workflow_run :
5- workflows :
6- - " Bump Alpha"
7- - " Bump Minor"
8- types :
9- - completed
4+ push :
5+ branches :
6+ - " master"
7+ - " master-2"
8+ - " master-beta"
109
1110concurrency :
12- group : publish-${{ github.event.workflow_run.head_branch }}
11+ group : publish-${{ github.ref_name }}
1312 cancel-in-progress : false
1413
1514permissions :
@@ -19,19 +18,18 @@ permissions:
1918jobs :
2019 publish :
2120 name : " Publish"
22- if : ${{ github.event.workflow_run.conclusion == 'success' }}
2321 timeout-minutes : 60
2422 runs-on : ubuntu-latest
2523
2624 steps :
2725 - uses : actions/checkout@v4
2826 with :
29- ref : ${{ github.event.workflow_run.head_sha }}
27+ ref : ${{ github.sha }}
3028 - uses : actions/setup-node@v4
3129 with :
3230 node-version : 22
3331 cache : " npm"
3432 registry-url : " https://registry.npmjs.org"
3533 - run : npm ci
3634 - run : npm run build
37- - run : npm publish --tag "${{ github.event.workflow_run.name == 'Bump Minor ' && 'latest ' || (github.event.workflow_run.name == 'Bump Alpha ' && 'alpha ' || 'beta ') }}" --access public --provenance
35+ - run : npm publish --tag "${{ github.ref_name == 'master-2 ' && 'alpha ' || (github.ref_name == 'master-beta ' && 'beta ' || 'latest ') }}" --access public --provenance
Original file line number Diff line number Diff line change 2828 }
2929 },
3030 "git" : {
31- "tagName" : " v ${version}"
31+ "tagName" : " release- ${version}"
3232 },
3333 "github" : {
3434 "release" : true
You can’t perform that action at this time.
0 commit comments