Skip to content

Fix publish workflow to skip existing GitHub releases#7

Merged
fbsobreira merged 1 commit intodevelopfrom
fix/publish-workflow-skip-existing-release
Feb 3, 2026
Merged

Fix publish workflow to skip existing GitHub releases#7
fbsobreira merged 1 commit intodevelopfrom
fix/publish-workflow-skip-existing-release

Conversation

@fbsobreira
Copy link
Member

Summary

  • Add a check in the publish workflow to skip GitHub release creation when a release for the version already exists
  • Prevents workflow failure when a release was created manually before the publish workflow runs

Test plan

  • Trigger publish workflow when a release already exists — should skip gracefully
  • Trigger publish workflow when no release exists — should create release as before

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 2, 2026 18:04
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

📦 Bundle Size Report

Package Size Gzipped
connect-contracts 87KB 17KB
connect-core 26KB 6KB
connect-crypto 29KB 7KB
connect-encoding 214KB 26KB
connect-provider 48KB 10KB
connect-react 24KB 5KB
connect-transactions 48KB 10KB
connect-wallet 59KB 10KB
connect 8KB 1KB

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a safety check to the publish workflow to prevent failures when attempting to create a GitHub release that already exists. This addresses scenarios where releases are created manually before the automated workflow runs.

Changes:

  • Added a pre-flight check using gh release view to detect existing releases before attempting creation
  • Implements graceful skipping with informative console output when a release already exists

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +63 to +67
# Skip if release already exists
if gh release view "v$VERSION" > /dev/null 2>&1; then
echo "Release v$VERSION already exists, skipping"
exit 0
fi
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

Consider checking for the existing release at the start of the job, before the npm publish step. This would provide better fail-fast behavior and clearer feedback. Additionally, consider checking if the npm package version already exists to provide a complete idempotency check. The current placement after npm publish means the workflow will still execute build, test, and npm publish steps even when the release already exists, wasting CI resources and potentially causing confusing errors if the npm version was also already published.

Copilot uses AI. Check for mistakes.
@fbsobreira fbsobreira merged commit 0a6a02d into develop Feb 3, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants