Skip to content

Commit b3dd0ee

Browse files
spicysouvlakiclaude
andcommitted
ci: release on demand and gate publishing on approval
CB-593. Until now, every push to main ran release-please, which kept a release PR open at all times, and merging it published to PyPI through the release event with no further check. The 1-pager wants publishing to be a deliberate, manual step. - release-please.yml now runs on workflow_dispatch, or on a push that changes .release-please-manifest.json (a release PR merging), which still tags it and creates the GitHub Release. Ordinary pushes no longer open or refresh a release PR. The changed-files check works for any merge method; matching on the "release: " title wouldn't. - The publish job runs in the "release" environment, which requires William's approval (created 11-04). Manual re-publishes go through the same gate. - No release-as input: release-please-action ignores it in manifest mode. To force a version, land a commit with a "Release-As: x.y.z" footer. stlc treats .github/workflows/* as branch-owned scaffolding, so these edits survive regeneration and need no re-seal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d684100 commit b3dd0ee

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎.github/workflows/publish-pypi.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
# identical); only production may publish. A stray GitHub Release on the
1616
# staging repo must never reach PyPI.
1717
if: github.repository == 'browserbase/sdk-python'
18+
environment: release
1819
runs-on: ubuntu-latest
1920

2021
steps:

‎.github/workflows/release-please.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@ on:
33
push:
44
branches:
55
- main
6+
workflow_dispatch:
67

78
permissions:
89
contents: write
910
pull-requests: write
1011

1112
jobs:
1213
release-please:
13-
if: github.repository == 'browserbase/sdk-python'
14+
# Release PRs open only when someone runs this workflow. A push runs it only
15+
# when a release PR merges (it bumps the manifest), to tag the release.
16+
if: >-
17+
github.repository == 'browserbase/sdk-python' &&
18+
(github.event_name == 'workflow_dispatch' ||
19+
contains(toJSON(github.event.commits.*.modified), '.release-please-manifest.json'))
1420
runs-on: ubuntu-latest
1521

1622
steps:

0 commit comments

Comments
 (0)