@@ -6,14 +6,12 @@ name: github-release
6
6
7
7
on :
8
8
push :
9
- branches :
10
- - beta/v*
11
9
tags :
12
- - v*
10
+ - " [0-9]+.[0-9]+.[0-9]+ "
13
11
workflow_dispatch :
14
12
inputs :
15
- beta-branch-or- tag-name :
16
- description : The name of the beta branch or tag to release
13
+ tag-name :
14
+ description : The name of the tag to release
17
15
type : string
18
16
required : true
19
17
@@ -25,36 +23,24 @@ jobs:
25
23
id : set-tag-name
26
24
run : |
27
25
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
28
- REF_NAME="${{ github.event.inputs.beta-branch-or- tag-name }}"
26
+ REF_NAME="${{ github.event.inputs.tag-name }}"
29
27
else
30
28
REF_NAME="${{ github.ref_name }}"
31
29
fi
32
30
33
- echo "ref-name=$REF_NAME" >> $GITHUB_OUTPUT
34
- echo "tag-name=${REF_NAME#beta/}" >> $GITHUB_OUTPUT
31
+ echo "tag-name=$REF_NAME" >> $GITHUB_OUTPUT
35
32
36
33
- name : Check out repository
37
34
uses : actions/checkout@v4
38
35
with :
39
36
fetch-depth : 0
40
- ref : ${{ steps.set-tag-name.outputs.ref-name }}
41
-
42
- - name : Set target name for beta branches
43
- id : set-target-name
44
- run : |
45
- if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then
46
- echo "target-name=${{ steps.set-tag-name.outputs.ref-name }}" >> $GITHUB_OUTPUT
47
- fi
48
-
49
- - name : Create a local tag for beta branches
50
- run : |
51
- if [ "${{ steps.set-target-name.outputs.target-name }}" != "" ]; then
52
- git tag "${{ steps.set-tag-name.outputs.tag-name }}"
53
- fi
37
+ ref : ${{ steps.set-tag-name.outputs.tag-name }}
54
38
55
39
- name : Run generate-changelog
56
40
id : generate-changelog
57
41
uses : autowarefoundation/autoware-github-actions/generate-changelog@v1
42
+ with :
43
+ git-cliff-args : --tag-pattern "^(\d+)\.(\d+)\.(\d+)$" --latest
58
44
59
45
- name : Select verb
60
46
id : select-verb
74
60
run : |
75
61
gh release ${{ steps.select-verb.outputs.verb }} "${{ steps.set-tag-name.outputs.tag-name }}" \
76
62
--draft \
77
- --target "${{ steps.set-target-name.outputs.target-name }}" \
78
63
--title "Release ${{ steps.set-tag-name.outputs.tag-name }}" \
79
64
--notes "$NOTES"
80
65
env :
0 commit comments