ci: migrate release-please to upstream action - #836
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository’s automated release triggering workflow from the Stainless wrapper action to the upstream googleapis/release-please-action v5, aligning configuration with the upstream schema and simplifying credentials/secrets handling.
Changes:
- Switch release triggering to pinned
googleapis/release-please-actionv5 and run it explicitly againstmainusing the repository manifest. - Update
release-please-config.jsonto the upstream schema and remove prerelease/beta versioning configuration. - Add
CONTRIBUTING.mdtoextra-filesso its release-please version markers are included.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| release-please-config.json | Updates schema reference, removes prerelease settings, and adds CONTRIBUTING.md to extra-files. |
| .github/workflows/create-releases.yml | Replaces the Stainless trigger with the upstream release-please action and adjusts job permissions/secrets isolation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Addressed the least-privilege feedback in |
c9db3b4 to
bb7b4dd
Compare
bb7b4dd to
9eb639c
Compare
|
Completed the comprehensive permissions and credential follow-up on the final rebased head:
Post-rebase validation passed: actionlint, pinned v17.6.0 schema validation, release-please resolved-config and stable-release dry runs, zizmor (no findings), diff checks, and the required thermo-nuclear review. The only inline review thread remains fixed and resolved. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9eb639cee5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Reviewed commit 9eb639cee5d2fc417489b8c3dbcc01be1df2d33c against the complete diff, upstream release-please source/documentation, live repository rulesets, workflow triggers, publishing environment, and existing release PRs.
There are two independent P1 release-path failures:
- The active
stainless release-please branchesruleset blocks creation/update ofrelease-please--*branches unless the actor is the Stainless GitHub App (integration378072) or@openai/sdks-team; theGITHUB_TOKENactor is the GitHub Actions integration (15368) and has neither bypass. - The existing unresolved review conversation is also correct:
GITHUB_TOKEN-generated release PRs do not triggerpull_requestworkflows, while the activemainruleset requires the GitHub ActionsCI / requiredstatus check. Even granting this token branch-rule bypass would therefore still leave release PRs unable to satisfy the required check.
There is also a P2 migration issue: currently-open release PR #835 uses Stainless's release-please--branches--main--changes--next branch, whereas upstream generates release-please--branches--main and matches existing release PRs by exact head branch, so merging this migration first produces competing pending release PRs.
A narrowly scoped GitHub App installation token, explicitly authorized by the release-branch ruleset and capable of triggering downstream workflows, can address both P1 issues without broadly weakening branch protections; the in-flight Stainless release should also be drained or migrated before cutover.
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Reviewed exact head ba5195bf7d5ce984f72eb532810bc0a0a2113471 against the complete diff, pinned upstream action and release-please source, live repository/effective branch rulesets, release-token scopes, required-check provenance, legacy PR #835, and current GitHub Actions event semantics. The previously reported release-branch authorization, explicitly dispatched release-PR checks, least-privilege token split, and legacy-PR cutover guard are resolved. One new P1 remains: unrestricted manual CI dispatch plus a caller-selected base SHA can bypass the protected branch's API-compatibility gate; see the inline comment.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/create-releases.yml:88
release_pr_ciis gated onprs_created == 'true', but the job consumes therelease_prpayload. If release-please updates an existing release PR (common when new commits land onmain) without treating it as “created”, this job won’t run and the release PR’s CI can become stale. Consider dispatching CI wheneverrelease_pris non-empty instead of only whenprs_createdis true.
needs: automatic_release
if: needs.automatic_release.outputs.prs_created == 'true'
permissions:
|
Reviewed the suppressed Copilot note about updates to an existing release PR. No code change is needed: pinned release-please v17.6.0 returns a PullRequest when it creates or updates an existing PR, and returns undefined only when the existing PR body is unchanged. Pinned action v5 filters that result and derives both prs_created and pr from the same non-empty array. Therefore every real update dispatches CI; an unchanged PR does not need a rerun. Sources: https://github.com/googleapis/release-please/blob/v17.6.0/src/manifest.ts#L922-L966 and https://github.com/googleapis/release-please-action/blob/45996ed1f6d02564a971a2fa1b5860e934307cf7/src/index.ts#L219-L225. This verification is also recorded in the PR body. |
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Reviewed exact head 676311ebb22cbb95e73bacc6ba6a14dea15ebe90 across the complete diff, live protections, pinned upstream release-please outputs, and release/retry/publishing paths. The prior P1 is fixed: manual CI no longer accepts a caller-controlled baseline, requires the exact same-repository bot-authored release PR/ref/head, and derives the compatibility base SHA from GitHub using job-scoped PR-read access. No substantive findings.
Summary
googleapis/release-please-actionv5.0.0mainusing the repository manifest and${{ secrets.GITHUB_TOKEN }}CONTRIBUTING.md, whose release-please version markers were previously omitted fromextra-filesSTAINLESS_API_KEYworkflow input and keep publish-environment secrets isolated to the publish jobGITHUB_TOKEN-generated release PRs, including API compatibility and the required aggregate checkThe automatic release job alone receives
contents,issues, andpull-requestswrite access. A separate release-PR CI job receives onlyactions: write; retry selection, runtime compatibility, and publishing receive onlycontents: read; the source selector receives no token permissions. The dispatched compatibility check adds only job-scopedpull-requests: readto validate the generated PR. Both the upstream action and retry verification explicitly use the built-inGITHUB_TOKEN—there is no private GitHub App credential or Stainless key in either path.The live
stainless release-please branchesruleset now excludes onlyrefs/heads/release-please--branches--mainfrom its create/update/delete restriction. GitHub does not permit its built-in Actions integration to be a ruleset bypass actor, so this exact-branch exclusion is required forGITHUB_TOKEN; every otherrelease-please--*branch and allmainprotections remain unchanged.Cutover requirement: merge or close legacy release PR #835 before the first upstream release run. The workflow enforces this and fails before creating a competing PR.
After this PR lands and the upstream workflow is in use,
STAINLESS_API_KEYcan be deleted from thepublishenvironment.Validation
actionlintv1.7.12zizmorv1.28.0 workflow audit: no findingsmainrelease: 4.50.0onrelease-please--branches--mainand loaded all annotated version filesprs_createdandpr; unchanged PRs are omitted by release-please's update path676311eb676311eb