Commit b154d0a 1 parent 495e7e5 commit b154d0a Copy full SHA for b154d0a
File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ jobs:
190
190
git diff --staged --no-ext-diff --quiet --exit-code
191
191
192
192
publish-release :
193
- name : Publish release
193
+ name : Check version and publish release
194
194
runs-on : ubuntu-latest
195
195
needs :
196
196
["linux", "mac", "windows"]
@@ -200,14 +200,19 @@ jobs:
200
200
- uses : actions/download-artifact@v4
201
201
with :
202
202
merge-multiple : true
203
- - id : release
203
+ - id : check-tag
204
204
if : ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
205
205
run : |
206
- RELEASE_TAG=$(date "+%F-%H-%M")
207
- gh release create ${RELEASE_TAG} ./*.tar.gz
206
+ RELEASE_TAG=mozjs-sys-v$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "mozjs_sys") | .version')
207
+ if git show-ref --tags --verify --quiet "refs/tags/${RELEASE_TAG}"; then
208
+ RELEASE_TAG=''
209
+ fi
208
210
echo "RELEASE_TAG=${RELEASE_TAG}" >> ${GITHUB_OUTPUT}
211
+ - name : Publish release
212
+ if : ${{ steps.check-tag.outputs.RELEASE_TAG != '' }}
213
+ run : gh release create ${{ steps.check-tag.outputs.RELEASE_TAG }} ./*.tar.gz
209
214
outputs :
210
- release-tag : ${{ steps.release .outputs.RELEASE_TAG }}
215
+ release-tag : ${{ steps.check-tag .outputs.RELEASE_TAG }}
211
216
212
217
verify-release :
213
218
name : Verify release
You can’t perform that action at this time.
0 commit comments