File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Create Tag and Release on Merge
22
33# This workflow creates a tag and GitHub Release when a release PR is merged to main
4- # Triggered when PR with title starting with "release:" is merged to main
4+ # It can also be triggered manually after a merge if the PR title was incorrect.
55
66on :
77 pull_request :
88 types : [closed]
99 branches :
1010 - main
11+ workflow_dispatch :
1112
1213jobs :
1314 create-tag-and-release :
14- if : github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'release:')
15+ if : github.event_name == 'workflow_dispatch' || (github. event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'release:') )
1516 runs-on : ubuntu-latest
1617 permissions :
1718 contents : write
1819 pull-requests : read
1920 steps :
20- - name : Checkout
21+ - name : Checkout main
22+ if : github.event_name != 'workflow_dispatch'
2123 uses : actions/checkout@v4
2224 with :
2325 fetch-depth : 0
2426 ref : main
2527
28+ - name : Checkout selected ref
29+ if : github.event_name == 'workflow_dispatch'
30+ uses : actions/checkout@v4
31+ with :
32+ fetch-depth : 0
33+
2634 - name : Setup Node.js
2735 uses : actions/setup-node@v4
2836 with :
29- node-version : 20
37+ node-version : 24
3038
3139 - name : Enable Corepack
3240 run : corepack enable
You can’t perform that action at this time.
0 commit comments