Repository navigation
fix(release): fix semantic-release fail-step crash (@semantic-release/github $owner bug) - #1
Merged
Merged
Conversation
…il-step crash @semantic-release/github 11.0.6 (pulled in by semantic-release 24.2.9) passes failTitle as an extra positional argument to findSRIssues(), shifting owner into the wrong slot, so the 'fail' step crashes with 'Variable $owner of type String! was provided invalid value' instead of opening the failure issue. 12.0.10 fixes the call.
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.
Why the Release workflow fails
Run: https://github.com/SahinurDEV/ForgeData/actions/runs/37893945394 (commit f66e6e3). The single
Releasejob fails in thenpx semantic-releasestep with two errors:Invalid npm token (root cause, owner-side, not fixed by this PR).
@semantic-release/npmrejects theNPM_TOKENrepo secret (last updated 2026-07-09). npm granular tokens with write access expire after at most 90 days, so this one most likely expired around 2026-10-07. Whatever the reason, the secret has to be replaced.The plugin's
failstep crashes (fixed here).semantic-release@24.2.9pulls in@semantic-release/github@11.0.6, the latest 11.x release. In that versionlib/fail.jscallsfindSRIssues(octokit, logger, failTitle, labels, owner, repo), butfind-sr-issues.jsonly takes(octokit, logger, labels, owner, repo). The extra argument pushes the labels array into$owner, so GitHub's GraphQL API rejects the query. Because of this, a failed release never opens its "release failed" issue. The bug is not caused by the account rename. 12.x fixes the call.Change
overridesentry inpackage.jsonthat pins@semantic-release/githubto^12.0.10and regeneratepackage-lock.json. Its peer dependency (semantic-release >=24.1.0) and engine requirement (node ^22.14 || >=24.10) both fit this workflow, which usesnode-version: 22.x.Verification
npm ciworks.npm ls @semantic-release/githubshows12.0.10 overridden.npm run lint,npm run typecheck,npm run test:coverage(26 files, 250 tests) andnpm run buildall pass.fail()with a mocked Octokit. The GraphQL variables now come out as{"owner":"SahinurDEV","repo":"ForgeData",...}and the step finishes without error.Owner action still required
The Release job will still fail until
NPM_TOKENis valid. Do one of the following:@sahinur/forgedatathat can publish without an OTP ("bypass 2FA"). Save it under Settings → Secrets and variables → Actions →NPM_TOKEN. Note that it will expire again.id-token: write. This needs@semantic-release/npm≥ 13.1 (that is, semantic-release 25), which would be a separate upgrade.Also:
v0.1.1andv0.2.0were tagged and published to npm by hand, and no Release run has ever succeeded. The next good run will use these tags as its baseline.