@@ -18,7 +18,7 @@ name: Release - create draft release
18
18
on :
19
19
workflow_dispatch :
20
20
inputs :
21
- tagName :
21
+ tag-name :
22
22
description : ' Name of git tag to be created, and then draft release created. Syntax: "v[0-9]+.[0-9]+.[0-9]+".'
23
23
required : true
24
24
41
41
core.setFailed('Tag does not match the required format "v[0-9]+.[0-9]+.[0-9]+"');
42
42
return;
43
43
}
44
- tag-name : ${{ github.event.inputs.tagName }}
44
+ tag-name : ${{ github.event.inputs.tag-name }}
45
45
46
46
- name : Check tag's correct version increment
47
47
uses : actions/github-script@v7
73
73
return;
74
74
}
75
75
76
- tag-name : ${{ github.event.inputs.tagName }}
77
-
78
- - name : Create and push tag
79
- uses : actions/github-script@v7
80
- with :
81
- script : |
82
- const tag = core.getInput('tag-name')
83
- const ref = `refs/tags/${tag}`;
84
- const sha = context.sha; // The SHA of the commit to tag
85
-
86
- await github.rest.git.createRef({
87
- owner : context.repo.owner,
88
- repo : context.repo.repo,
89
- ref : ref,
90
- sha : sha
91
- });
92
-
93
- console.log(`Tag created : ${tag}`);
94
- github-token : ${{ secrets.GITHUB_TOKEN }}
95
- tag-name : ${{ github.event.inputs.tagName }}
76
+ tag-name : ${{ github.event.inputs.tag-name }}
96
77
97
78
release :
98
79
needs : tag
101
82
- uses : actions/checkout@v4
102
83
with :
103
84
fetch-depth : 0
104
- ref : refs/tags/${{ github.event.inputs.tagName }}
85
+ ref : refs/tags/${{ github.event.inputs.tag-name }}
105
86
106
87
- uses : actions/setup-python@v5.1.1
107
88
with :
113
94
env :
114
95
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
115
96
with :
116
- tag-name : ${{ github.event.inputs.tagName }}
97
+ tag-name : ${{ github.event.inputs.tag-name }}
117
98
chapters : |
118
99
[
119
100
{"title": "Breaking Changes 💥", "label": "breaking-change"},
@@ -123,13 +104,32 @@ jobs:
123
104
]
124
105
warnings : true
125
106
107
+ - name : Create and Push Tag
108
+ uses : actions/github-script@v7
109
+ with :
110
+ script : |
111
+ const tag = core.getInput('tag-name')
112
+ const ref = `refs/tags/${tag}`;
113
+ const sha = context.sha; // The SHA of the commit to tag
114
+
115
+ await github.rest.git.createRef({
116
+ owner: context.repo.owner,
117
+ repo: context.repo.repo,
118
+ ref: ref,
119
+ sha: sha
120
+ });
121
+
122
+ console.log(`Tag created: ${tag}`);
123
+ github-token : ${{ secrets.GITHUB_TOKEN }}
124
+ tag-name : ${{ github.event.inputs.tag-name }}
125
+
126
126
- name : Create draft release
127
127
uses : softprops/action-gh-release@v1
128
128
env :
129
129
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
130
130
with :
131
- name : ${{ github.event.inputs.tagName }}
132
- body : ${{ steps.release_notes_generator.outputs.releaseNotes }}
133
- tag_name : ${{ github.event.inputs.tagName }}
131
+ name : ${{ github.event.inputs.tag-name }}
132
+ body : ${{ steps.release_notes_generator.outputs.release-notes }}
133
+ tag_name : ${{ github.event.inputs.tag-name }}
134
134
draft : true
135
135
prerelease : false
0 commit comments