We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4de7e7e commit 1d0f57aCopy full SHA for 1d0f57a
.github/workflows/build-or-publish.yml
@@ -130,10 +130,14 @@ jobs:
130
run: |
131
version=$(node -p "require('./package.json').version")
132
tag="v${version}"
133
- echo "version=${version}" >> $GITHUB_OUTPUT
134
echo "tag=${tag}" >> $GITHUB_OUTPUT
135
- git tag "${tag}"
136
- git push https://x-access-token:${GIT_TOKEN}@github.com/${{ github.repository }} "${tag}"
+ git fetch origin --tags || true
+ if ! git rev-parse "${tag}" >/dev/null 2>&1; then
+ git tag "${tag}"
137
+ git push https://x-access-token:${GIT_TOKEN}@github.com/${{ github.repository }} "${tag}"
138
+ else
139
+ echo "Tag ${tag} already exists, skipping creation"
140
+ fi
141
142
- name: Generate release notes
143
uses: softprops/action-gh-release@v2.4.2
0 commit comments