fix(ci): override GITHUB_REF for beta releases#1143
Merged
Conversation
semantic-release uses env-ci which reads GITHUB_REF to determine the current branch. Since workflow_dispatch runs from master, GITHUB_REF is refs/heads/master even after git checkout -B beta. This caused beta releases to publish as stable versions instead of prereleases. Override GITHUB_REF=refs/heads/beta in the beta release step so semantic-release correctly detects the beta branch and publishes prerelease versions with the @beta dist-tag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GITHUB_REF=refs/heads/betain the beta release stepenv-ciwhich readsGITHUB_REFto determine the branch. Sinceworkflow_dispatchruns from master,GITHUB_REF=refs/heads/mastereven aftergit checkout -B beta, causing beta releases to publish as stable versionsAlso fixed (outside this PR)
@segment/analytics-react-native-plugin-appsflyer-v0.8.0(manual npm publish had no tag)latestdist-tag on npm for@segment/analytics-react-native-plugin-appsflyerstill points to 0.6.1 instead of 0.8.0 — needs manual fix:npm dist-tag add @segment/analytics-react-native-plugin-appsflyer@0.8.0 latestTest plan
-beta.Xsuffix and@betadist-tag (not@latest)🤖 Generated with Claude Code