fix(ci): use env, not secrets context, in beta-release if condition#748
Merged
Conversation
The `secrets` context is not available in step `if:` conditions, so
`if: ${{ secrets.RELEASE_TOKEN == '' }}` made beta-release.yml invalid.
GitHub failed every run at parse time ("workflow file issue"), so PR #718
(labeled `beta-release`) never bumped the version or published a beta.
Hoist RELEASE_TOKEN to a job-level env var and test `env.RELEASE_TOKEN`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Looks good — fixes the invalid
barista · claude-opus-4-8 · 42 in / 2.1k out · 670k cached · 32s · $0.156 |
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.
Problem
PR #718 (
feat(editor): Editor molecule) was merged with thebeta-releaselabel, but no beta was published.The
Bump Beta Versionworkflow (beta-release.yml) failed at parse time on every push/merge tomain— GitHub reports "This run likely failed because of a workflow file issue" and the run log isnot found. No job ever ran, so the version was never bumped andpublish.ymlnever published.Root cause
The
secretscontext is not available in stepif:conditions (allowed contexts:github, needs, strategy, matrix, job, runner, env, vars, steps, inputs). This makes the workflow file invalid. The guard added in d721c92 to "fail loudly if RELEASE_TOKEN is missing" instead silently broke the whole pipeline.package.jsononmainis still1.0.0-beta.0, confirming the bump never ran.Fix
Hoist the token to a job-level
envvar and testenv.RELEASE_TOKEN(the standard pattern for gating on a secret's presence). One-line behavior change; thewith: token:usage is untouched (secretsis valid inwith).Follow-up (not in this PR)
The fix only affects future labeled merges. #718's beta won't release retroactively — a manual bump/publish (or an empty
beta-release-labeled PR) is needed to ship1.0.0-beta.1now.🤖 Generated with Claude Code
Docs preview: https://ui.frappe.io/pr-preview/pr-748/
Coverage: 56.13% (±0.00% vs
main)