We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bab91a7 commit c2f6b39Copy full SHA for c2f6b39
1 file changed
.github/workflows/release.yml
@@ -53,9 +53,8 @@ jobs:
53
TAG="v${{ steps.semantic.outputs.release-major }}"
54
SHA="${{ steps.semantic.outputs.git-head }}"
55
56
- # Update or create the major version tag using GitHub API
57
- gh api --method POST /repos/${{ github.repository }}/git/refs \
58
- -f ref="refs/tags/${TAG}" \
59
- -f sha="${SHA}" \
60
- || gh api --method PATCH /repos/${{ github.repository }}/git/refs/tags/${TAG} \
61
- -f sha="${SHA}" -F force=true
+ # Update existing major tag or create it (update first to avoid "Reference already exists")
+ gh api --method PATCH /repos/${{ github.repository }}/git/refs/tags/${TAG} \
+ -f sha="${SHA}" -F force=true \
+ || gh api --method POST /repos/${{ github.repository }}/git/refs \
+ -f ref="refs/tags/${TAG}" -f sha="${SHA}"
0 commit comments