Commit a58bfe9 1 parent fb6869e commit a58bfe9 Copy full SHA for a58bfe9
File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -200,14 +200,16 @@ jobs:
200
200
- uses : actions/download-artifact@v4
201
201
with :
202
202
merge-multiple : true
203
- - id : check-tag
203
+ - name : Publish release if tag doesn't exist
204
+ id : check-tag
204
205
if : ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
205
206
run : |
206
207
RELEASE_TAG=mozjs-sys-v$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "mozjs_sys") | .version')
208
+ git fetch --tags --quiet
209
+ if ! git show-ref --tags --verify --quiet "refs/tags/${RELEASE_TAG}" ; then
210
+ gh release create ${{ steps.check-tag.outputs.RELEASE_TAG }} ./*.tar.gz
211
+ fi
207
212
echo "RELEASE_TAG=${RELEASE_TAG}" >> ${GITHUB_OUTPUT}
208
- - name : Publish release
209
- if : ${{ steps.check-tag.outputs.RELEASE_TAG != '' }}
210
- run : gh release create ${{ steps.check-tag.outputs.RELEASE_TAG }} ./*.tar.gz || exit 0
211
213
outputs :
212
214
release-tag : ${{ steps.check-tag.outputs.RELEASE_TAG }}
213
215
You can’t perform that action at this time.
0 commit comments