ci: migrate release-please to upstream action - #3568
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77f69f23f4
ℹ️ 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.
Two independent P1 release blockers make this migration unsafe to merge as written:
- The existing unresolved review thread correctly identifies that
GITHUB_TOKENsuppresses branch/PR workflow events. Themainruleset requires seven GitHub Actions checks, so generated release PRs cannot merge. Provision the short-livedopenai-sdksinstallation token before cutover; deferring it to a follow-up halts releases. - The newly added inline comment identifies a separate protected-release-branch ruleset that neither GitHub Actions nor the proposed SDK App can bypass.
Additionally, the second inline comment documents why still-open release PR #3562 must be merged and released, or closed, before takeover. After the successful cutover, revoke/delete the still-configured STAINLESS_API_KEY from the publish environment.
The stable-release configuration, action pin, per-job permissions, checkout credential handling, and isolated PyPI OIDC publishing boundary otherwise look appropriate.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cca60b70b
ℹ️ 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.
Re-reviewed the full current diff at exact head 8b3bc1ccfc80ad7bcffc7b96270dd4121c3678d1 (newer than the previously reported 770f79fc) against the live rulesets, release state, pinned upstream action, and GitHub Actions event/token semantics.
- The least-privileged dispatch job fetches the live release PR/base SHA, verifies the exact
release-please--branches--mainhead, and dispatchesci.yml,detect-breaking-changes.yml, andcodeql.yml; the resulting jobs cover all seven status checks actually required by the activemainruleset. GitHub Code Quality also runs its separate dynamic analysis for GitHub-Actions-authored PRs. - Active ruleset
15951502now excludes onlyrefs/heads/release-please--branches--main; existing release PR #3562 was merged andv2.52.1was successfully released/published, with the migration branch carrying the matching manifest and version baseline. - The release/build jobs have no OIDC access; Stainless OIDC is isolated to the Stainless-only upload job, and PyPI Trusted Publishing OIDC remains confined to the protected
publishenvironment job. The upstream action pin resolves to v5.0.0, and the configuration validates against its bundled release-please v17.6.0 schema. - All five prior review conversations are resolved.
No substantive findings. After merge, revoke/delete the still-present legacy STAINLESS_API_KEY from the publish environment as already planned.
Summary
stainless-api/trigger-release-pleasewith the upstreamgoogleapis/release-please-action, pinned to verified v5.0.0 commit45996edmainwith the repository's manifest configurationGITHUB_TOKENexplicitly and remove theSTAINLESS_API_KEYaction inputrelease-please--branches--mainPRpublishenvironment scoped to the PyPI publish jobImpact
Release PRs and GitHub releases are now managed entirely by the open-source release-please action. Stable release versions continue to update
CHANGELOG.md,.release-please-manifest.json,pyproject.toml, andsrc/openai/_version.py; successful GitHub release creation still gates the existing build and trusted PyPI publish jobs.Release Please deliberately uses
GITHUB_TOKEN. Because GitHub suppresses ordinary push and pull-request events created by that token, a separate least-privilege job explicitly dispatches CI, breaking-change detection, and CodeQL against the generated release PR. It fetches the PR's live base SHA immediately before dispatch and restricts this path to the exactrelease-please--branches--mainref.Permission audit
contents: writefor the release branch, tags, and GitHub releases;pull-requests: writefor release PRs;issues: writefor PR labelsactions: writeonly to dispatch workflows andpull-requests: readonly to obtain the current base SHA and verify the generated head branchcontents: read; the secret-bearing examples job is not dispatched for release PRscontents: readonly, with checkout credential persistence disabled; the Stainless mirror's OIDC upload is isolated in a separate Stainless-only jobcontents: readandsecurity-events: writein its existing dedicated workflowcontents: readonly, with checkout credential persistence disabledid-token: writeonly for PyPI Trusted PublishingValidation
debug-config --dry-run: loaded the Python strategy with stable/default versioning and target branchmainrelease-pr --dry-run: generated the expected stable branch and version-file changes2.52.1git diff --checkCutover prerequisites completed
15951502now excludes onlyrefs/heads/release-please--branches--main; all otherrelease-please--*branches and the two original bypass actors remain unchanged2.52.1manifest/version baselineAfter merge
STAINLESS_API_KEYsecret from the repository/environmentopenai-sdksApp should be handled separately; this PR intentionally uses onlyGITHUB_TOKEN