Skip to content

fix(ci): prevent staging workflow from publishing stable versions with rc tags#104

Merged
pasevin merged 1 commit into
mainfrom
fix/prevent-staging-workflow-stable-version-rc-tagging
Aug 13, 2025
Merged

fix(ci): prevent staging workflow from publishing stable versions with rc tags#104
pasevin merged 1 commit into
mainfrom
fix/prevent-staging-workflow-stable-version-rc-tagging

Conversation

@pasevin

@pasevin pasevin commented Aug 13, 2025

Copy link
Copy Markdown
Collaborator

Problem

Fixed the race condition where the staging workflow would incorrectly publish stable versions (e.g., 0.4.0, 0.5.0) with 'rc' tags on npm instead of 'latest' tags.

Root Cause

When 'Version Packages' PRs were merged:

  1. Package.json versions were updated to stable versions (0.4.0, etc.)
  2. Both staging and release workflows triggered simultaneously
  3. Staging workflow ran changeset version --snapshot rc → 'No unreleased changesets found'
  4. Staging workflow fell back to publishing existing stable versions with --tag rc
  5. Release workflow tried to publish but npm said 'already exists'

Solution

  • Added changeset detection to skip RC publishing when no pending changesets exist
  • Added concurrency controls to prevent staging/release workflow conflicts
  • Only publish RC snapshots when there are actual changes to test

This ensures:

  • ✅ Staging workflow only publishes when there are changes to test
  • ✅ Release workflow can properly publish stable versions with 'latest' tags
  • ✅ No more stable versions incorrectly tagged as 'rc' on npm

Files Changed

  • : Added changeset detection and concurrency controls
  • : Updated concurrency group naming for coordination

Testing

The fix has been tested locally and the logic prevents the race condition scenario that caused the npm tagging issue.

…h rc tags

- Add changeset detection to staging workflow to skip RC publishing when no pending changesets exist
- Add concurrency controls to prevent staging/release workflow conflicts
- Only publish RC snapshots when there are actual changes to test
- Prevents stable versions from being incorrectly tagged as 'rc' on npm
- Ensures Release workflow can properly publish stable versions with 'latest' tags

Fixes issue where Version Packages merge triggered staging workflow to publish
stable versions (0.4.0, 0.5.0, etc.) with 'rc' tags instead of 'latest' tags.
@pasevin
pasevin requested review from a team as code owners August 13, 2025 13:06
@pasevin
pasevin merged commit dc9d468 into main Aug 13, 2025
11 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.

1 participant