File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -139,16 +139,39 @@ jobs:
139
139
permissions :
140
140
contents : write
141
141
142
+ env :
143
+ TAG : v${{ needs.meta.outputs.latest-version }}
144
+ COMMIT : ${{ github.event.before }}
145
+
142
146
steps :
143
147
- name : Checkout current head
144
148
uses : actions/checkout@v4
145
149
with :
146
- ref : ${{ github.event.before }}
150
+ ref : ${{ env.COMMIT }}
147
151
148
- - name : Mark the current head with the latest version before the update
152
+ - name : Create a tag to mark previous latest version
149
153
env :
150
- TAG : v${{ needs.meta.outputs.latest-version }}
151
- run : git tag $TAG && git push origin $TAG
154
+ COMMIT : ${{ env.COMMIT }}
155
+ run : >
156
+ gh api
157
+ --method POST
158
+ -H "Accept: application/vnd.github+json"
159
+ -H "X-GitHub-Api-Version: 2022-11-28"
160
+ /repos/${{ github.repository }}/git/refs
161
+ -f "ref=refs/tags/$TAG"
162
+ -f "sha=$COMMIT"
163
+ - name : Create release assotiated with the tag
164
+ run : >
165
+ gh api
166
+ --method POST
167
+ -H "Accept: application/vnd.github+json"
168
+ -H "X-GitHub-Api-Version: 2022-11-28"
169
+ /repos/${{ github.repository }}/releases
170
+ -f "tag_name=$TAG"
171
+ -f "name=$TAG"
172
+ -f "body=Automatic release for $TAG"
173
+ -f "generate_release_notes=true"
174
+
152
175
153
176
automerge :
154
177
needs : build
You can’t perform that action at this time.
0 commit comments