Skip to content

fix: skip existing releases#17

Merged
bniladridas merged 1 commit into
mainfrom
fix-release-existing-tags
May 21, 2026
Merged

fix: skip existing releases#17
bniladridas merged 1 commit into
mainfrom
fix-release-existing-tags

Conversation

@bniladridas

Copy link
Copy Markdown
Contributor

Summary

  • Skip release creation when the version release already exists.
  • Normalize the release workflow version-check indentation.
  • Keep repeated pushes or history repairs from failing on an existing tag.

Verification

  • yamllint .github/workflows/release.yml
  • actionlint .github/workflows/release.yml
  • pre-push hooks

@github-actions github-actions Bot mentioned this pull request May 21, 2026
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.version_check.outputs.new_version }}"
if gh release view "v${VERSION}" >/dev/null 2>&1; then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard keeps the release workflow idempotent. It matters after a release rerun or a main-history repair because the version can still look changed while the GitHub release/tag already exists; in that case the workflow should report the existing release and exit successfully instead of failing with a 422 from gh release create.

@bniladridas bniladridas merged commit 577fbf6 into main May 21, 2026
5 checks passed
@bniladridas bniladridas deleted the fix-release-existing-tags branch May 21, 2026 21:06
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant