Update publish.yml to handle existing tag (#13463)

This commit is contained in:
Glenn Jocher 2024-06-10 02:47:37 +02:00 committed by GitHub
parent f77349547e
commit 199083d5f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,7 +60,7 @@ jobs:
- name: Publish new tag
if: (github.event_name == 'push' || github.event.inputs.pypi == 'true') && steps.check_pypi.outputs.increment == 'True'
run: |
git tag -a "v${{ steps.check_pypi.outputs.version }}" -m "$(git log -1 --pretty=%B)" # i.e. "v0.1.2 commit message"
git tag -a "v${{ steps.check_pypi.outputs.version }}" -m "$(git log -1 --pretty=%B)" || true # i.e. "v0.1.2 commit message"
git push origin "v${{ steps.check_pypi.outputs.version }}" || true
- name: Publish new release
if: (github.event_name == 'push' || github.event.inputs.pypi == 'true') && steps.check_pypi.outputs.increment == 'True'