Skip to content

Commit a58bfe9

Browse files
committed
Revert latest commit
1 parent fb6869e commit a58bfe9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/rust.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,16 @@ jobs:
200200
- uses: actions/download-artifact@v4
201201
with:
202202
merge-multiple: true
203-
- id: check-tag
203+
- name: Publish release if tag doesn't exist
204+
id: check-tag
204205
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
205206
run: |
206207
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
207212
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
211213
outputs:
212214
release-tag: ${{ steps.check-tag.outputs.RELEASE_TAG }}
213215

0 commit comments

Comments
 (0)