Repository navigation
ci: open a release-please-action bump pr after each publish - #25
Draft
helenyugithub wants to merge 1 commit into
Draft
helenyugithub wants to merge 1 commit into
helenyugithub wants to merge 1 commit into
Conversation
GitHub runs the committed dist/index.js of nominal-io/release-please-action and never installs its dependencies, so a release here does nothing until that repo bumps @nominal-io/release-please and rebuilds dist/. publish.yaml now calls a new reusable workflow after npm publish succeeds. It builds and tests the bump with a read-only GITHUB_TOKEN, then mints the nombotv2 token in a separate job that never runs npm and opens or updates a draft PR from automation/update-release-please. It can also be dispatched with a version to retry or backfill. Co-Authored-By: Claude Opus 5.5 <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.
Why
nominal-io/release-please-action runs
dist/index.js, an ncc bundle that includes@nominal-io/release-please. GitHub never runsnpm installfor JavaScript actions, so a release of this fork has no effect until someone bumps the dependency in the action repo and commits a rebuiltdist/. Nobody did that between May and September, so scout'sbazel-deps-queryconfig key was silently ignored until nominal-io/release-please-action#7.What
update-release-please-action.yaml. This reusable workflow checks out the action repo and runsnpm ci,npm install @nominal-io/release-please@<version>,npm run buildandnpm test. If that changes anything, it opens a draft PR titledchore(deps): update @nominal-io/release-please to v<version>fromautomation/update-release-please, or updates the PR that is already open. It also has aworkflow_dispatchtrigger with aversioninput, for retries and backfills.publish.yamlcalls it afternpm publishsucceeds and passes the version it published.publish.yaml's bareactions/checkout@v4is now pinned to11d5960a…, the SHA the repo already uses.v4points to that commit today, so the same code runs.Design notes
mainruleset, so a nombotv2 token can push tomainwithout review. The pinned token action can't limit a token to one repo, and nombotv2 is installed on every repo in the org. So:buildruns all npm code (install scripts, build, tests) with only this repo's read-onlyGITHUB_TOKEN.packages: readis enough because the private package is linked to this repo.buildhands a patch topull-requestas an artifact.pull-requestmints the nombotv2 token (contents: write,pull_requests: write, revoked when the job ends) and never runs npm. It refuses any patch that touches files other thanpackage.json,package-lock.jsonanddist/.publish.yamlalready has an input-lessworkflow_dispatchthat publishes. Adding a version input there would either mix publishing with bumping or take away manual publishing.@<version>, not@^<version>, so a backfill can't resolve to a newer release. npm still writes^<version>topackage.json, as in chore(deps): update @nominal-io/release-please to v18.3.0 release-please-action#7.dist/is up to date, the run ends with a notice and opens no PR.Testing
Exercised
4b51bf0), the build commands regenerate chore(deps): update @nominal-io/release-please to v18.3.0 release-please-action#7's tree byte for byte. That holds on macOS with Node 20.19.0 and on Linux x86_64 with Node 20.20.2, whichnode-version: 20resolves to.main(7f728fd) they change nothing.buildjob end to end with act. Ran viaworkflow_dispatchwithversion=18.3.0: checkout of the action repo, setup-node registry auth,npm ci, install, build and test all passed. It ended with the "already on 18.3.0 … nothing to do" notice. act 0.2.54 can't load node24 actions, so this run used a copy with only the (skipped) upload-artifact step removed.Diff: both the no-op and the changed case.Commit and pushinto a local bare repo: the pushed tree equals chore(deps): update @nominal-io/release-please to v18.3.0 release-please-action#7's tree, the author isnombotv2[bot], and a re-run force-pushes cleanly. A patch that also edits.github/workflows/ci.yamlis refused and nothing is pushed.gh: creates a draft when no PR is open, and PATCHes the PR when one is.head=filter.Not exercised (can't run before merge or without the app key)
releasetrigger, and theworkflow_callfrompublish.yaml.GITHUB_TOKENreading the private package. Locally I used a PAT withread:packages.After merge
Run the backfill for the current version:
nominal-io/release-please-action#7 is already merged, so this run should end in
buildwith "already on 18.3.0 … nothing to do", skippull-request, and open no PR. That run exercises the realGITHUB_TOKENpackage read. The first real release exercises the rest.🤖 Generated with Claude Code