fix(ci): lockstep-publish wrappers without writing to the repo#100
Merged
Conversation
The webjsdev org disables write permissions for GITHUB_TOKEN, so both prior lockstep designs failed: direct push is refused by branch protection, and `gh pr create` is refused with "GitHub Actions is not permitted to create or approve pull requests". Since the wrapper version is recomputed from CLI_VERSION on every release, the repo copy of the wrapper package.json is irrelevant to publishing. Drop all git operations from the lockstep step and just set the version in the runner's working tree + `npm publish`. No push, no PR, no org-policy fight. The repo's wrapper package.json versions intentionally drift (npm is their source of truth). Also add a `lockstep_only` workflow_dispatch input that runs only this step at the current CLI version, as a recovery path for a release whose wrapper publish did not land.
2 tasks
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
The wrapper lockstep step has failed on every real release because the
webjsdevorg disables write permissions forGITHUB_TOKEN:mainbranch protection (GH006).gh pr createrefused with "GitHub Actions is not permitted to create or approve pull requests" (org-levelcan_approve_pull_request_reviewsis off and the repo can't override it).Both fight the org policy. cli/server publish fine; only the wrappers strand.
Fix (option 1: don't write to the repo)
The wrapper version is recomputed from
CLI_VERSIONon every release, so the repo copy of the wrapperpackage.jsonis irrelevant to publishing. This drops all git operations from the lockstep step and just:npm publish(idempotent: skips a version already on the registry).No push, no PR, no PAT, no org-setting change. The repo's wrapper
package.jsonversions intentionally drift; npm is their source of truth and nothing reads the repo values.Also adds a
lockstep_onlyworkflow_dispatchinput that runs only this step at the current cli version, as a recovery path (and used to publish the currently-strandedcreate-webjs@0.9.0/webjsdev@0.9.0).Verification plan
After merge, dispatch
release.ymlwithlockstep_only=true. It should publishcreate-webjs@0.9.0andwebjsdev@0.9.0(currently stranded at 0.8.6) using the workflow'sNPM_TOKEN, proving the no-git path works end-to-end.