File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
name : Release
2
2
3
3
on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ description : " Version to release"
8
+ required : true
9
+ type : string
4
10
pull_request_target :
5
11
types :
6
12
- closed
15
21
create-tag :
16
22
name : Create the Git tag
17
23
if : >-
24
+ github.event_name == 'workflow_dispatch' ||
18
25
github.event.pull_request.merged == true
19
26
&& contains(github.event.pull_request.labels.*.name, 'release-version')
20
27
runs-on : ubuntu-latest
@@ -26,10 +33,13 @@ jobs:
26
33
- uses : actions/checkout@v4
27
34
- name : Extract version to be released
28
35
id : get-version
29
- env :
30
- TITLE : ${{ github.event.pull_request.title }}
31
36
run : |
32
- echo "version=${TITLE/: [[:alnum:]]*}" >> "$GITHUB_OUTPUT"
37
+ if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
38
+ echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
39
+ else
40
+ TITLE=${{ github.event.pull_request.title }}
41
+ echo "version=${TITLE/: [[:alnum:]]*}" >> "$GITHUB_OUTPUT"
42
+ fi
33
43
- name : Bump version and push tag
34
44
uses : mathieudutour/github-tag-action@v6.2
35
45
with :
You can’t perform that action at this time.
0 commit comments