ci: run release-please via CLI instead of the googleapis action#324
ci: run release-please via CLI instead of the googleapis action#324max-parke-scale wants to merge 1 commit into
Conversation
03180ce to
70d3124
Compare
| - uses: actions/setup-node@v4 | ||
| with: | ||
| config-file: release-please-config.json | ||
| manifest-file: .release-please-manifest.json | ||
| node-version: "20" | ||
| - name: Release PR + GitHub release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | |
There was a problem hiding this comment.
This workflow invokes the release-please CLI before checking out the repository. The CLI needs the project files named by --config-file and --manifest-file, plus the files referenced by the release config. On a GitHub-hosted runner, the workspace does not contain those files until actions/checkout runs, so the release step can fail before opening or updating the release PR.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/release-please.yml
Line: 21-27
Comment:
**Checkout is missing**
This workflow invokes the `release-please` CLI before checking out the repository. The CLI needs the project files named by `--config-file` and `--manifest-file`, plus the files referenced by the release config. On a GitHub-hosted runner, the workspace does not contain those files until `actions/checkout` runs, so the release step can fail before opening or updating the release PR.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Checkout — false positive. With --repo-url set, the release-please CLI reads --config-file, --manifest-file, and every referenced file from the repo via the GitHub API, not the local workspace. Verified empirically: I ran release-please release-pr --dry-run --repo-url=scaleapi/scale-agentex --config-file=release-please-config.json --manifest-file=.release-please-manifest.json from an empty /tmp dir (no checkout) and it fetched everything (❯ Fetching pyproject.toml from branch main, .release-please-manifest.json, agentex/openapi.yaml, …) and generated the release PR. The googleapis action runs without a checkout for the same reason — so no actions/checkout is needed.
issues: write (the outside-diff note) — addressed: added it. release-please labels release PRs (autorelease:*) via the Issues API, and the dry-run doesn't exercise label-writing, so I can't rule out the 403 — cheap to grant.
🧑💻🤖 — posted via Claude Code
The googleapis/release-please-action isn't on the org Actions allow-list, so the release-please workflow added in #321 failed at startup (no release PR cut). Run the release-please CLI under actions/setup-node (allow-listed) instead — same manifest-mode behavior (release-pr + github-release), no third-party action. Verified the CLI commands/flags against release-please@16. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
70d3124 to
b21deb7
Compare
What
Rewrites the release-please workflow (added in #321) to run the release-please CLI under
actions/setup-node, instead ofgoogleapis/release-please-action.Why
After #321 merged, the workflow failed at startup on every push to
main(startup_failure, no logs, no release PR cut). The merged YAML is valid and the action SHA resolves — the cause is the org Actions allow-list:googleapis/release-please-actionisn't on it. (Every other workflow here uses onlyactions/,astral-sh/,docker/,stainless-api/,codecov/,dorny/; the Actions-policy API is admin-only/403 for me, so I couldn't read it directly, but the signature is unambiguous.)Fix
Run
npx release-please@16 release-pr+github-release(manifest mode — same as the action did internally) underactions/setup-node@v4, which is allow-listed (actions/*is used throughout the repo). No third-party action → allow-list-proof.Verified the CLI commands (
release-pr/github-release;manifest-pr/manifest-releaseare deprecated aliases) and flags (--token,--repo-url,--config-file,--manifest-file) againstrelease-please@16.After merge
Runs on
main; once afeat/fixlands (or viaworkflow_dispatch) it opens the first release PR → merging that cuts the firstvX.Y.Ztag. Config + manifest are unchanged from #321.🧑💻🤖 — posted via Claude Code
Greptile Summary
googleapis/release-please-actionworkflow step with directrelease-please@16CLI commands.actions/setup-node@v4before running release PR and GitHub release commands.issues: writefor label management.Confidence Score: 5/5
The workflow change is narrowly scoped to replacing a blocked GitHub Action with equivalent CLI invocations.
Only one CI workflow file changed, the release-please config and manifest remain unchanged, and no code issues were identified.
What T-Rex did
Comments Outside Diff (1)
.github/workflows/release-please.yml, line 12-14 (link)The CLI still applies and removes release-please labels on release PRs, and those calls go through GitHub's Issues API. This workflow only grants
contents: writeandpull-requests: write, so the job can fail with a permissions error when it tries to add or remove labels likeautorelease: pending. Addissues: writehere so the CLI has the same label permissions the release flow needs.Prompt To Fix With AI
Reviews (2): Last reviewed commit: "ci: run release-please via CLI instead o..." | Re-trigger Greptile