Skip to content

fix: trigger PyPI publish/deploy by authoring releases with the DS_RELEASE_BOT app token#1407

Open
lhoupert wants to merge 3 commits into
mainfrom
fix/release-please-app-token
Open

fix: trigger PyPI publish/deploy by authoring releases with the DS_RELEASE_BOT app token#1407
lhoupert wants to merge 3 commits into
mainfrom
fix/release-please-app-token

Conversation

@lhoupert
Copy link
Copy Markdown
Contributor

@lhoupert lhoupert commented May 29, 2026

What this does

Fixes #1406: bot-authored releases never trigger PyPI publish/deploy.

release-please currently uses the default GITHUB_TOKEN, so releases are authored by github-actions[bot]. GitHub does not cascade workflow runs from default-GITHUB_TOKEN events (anti-recursion), so release: published never fired for 2.0.3 → build / upload_pypi (gated on github.event_name == 'release') and deploy.yml were skipped, and 2.0.3 was never published.

This mints a short-lived GitHub App installation token and passes it to release-please-action. Events from an App token do create new workflow runs, so the existing publish + deploy workflows cascade automatically — no change to build, upload_pypi, or deploy.yml.

Uses the existing org-level release App (secrets DS_RELEASE_BOT_ID / DS_RELEASE_BOT_PRIVATE_KEY) — no new App or secrets needed. The minted token is scoped to least privilege (Contents + Pull requests, R/W) so it doesn't inherit the App's blanket installation permissions.

Changes

  • .github/workflows/release.yml: add actions/create-github-app-token (SHA-pinned, v2.2.2) step using DS_RELEASE_BOT_ID / DS_RELEASE_BOT_PRIVATE_KEY, scoped to permission-contents: write + permission-pull-requests: write; pass its token to release-please instead of secrets.GITHUB_TOKEN.
  • RELEASING.md: document that the release is authored via the App token, which is what makes publish/deploy trigger.

Before merge — verify (org admin)

  • The DS_RELEASE_BOT App is installed on this repo and has Contents: R/W + Pull requests: R/W.
  • The org secrets DS_RELEASE_BOT_ID / DS_RELEASE_BOT_PRIVATE_KEY are visible to developmentseed/titiler.

Once confirmed, the real test is the next chore: release PR: the release should be authored by the App (not github-actions[bot]) and publish/deploy automatically.

🤖 Generated with Claude Code

Releases created by release-please using the default GITHUB_TOKEN are
authored by github-actions[bot]. GitHub deliberately does not trigger new
workflow runs from events caused by the default GITHUB_TOKEN (anti-recursion),
so the `release: published` event never fired for bot-created releases. As a
result the build / upload_pypi jobs (gated on `github.event_name == 'release'`)
and the deploy.yml workflow were skipped, and 2.0.3 was never published to PyPI
nor deployed.

Mint a short-lived GitHub App installation token in the release-please job and
pass it to the action so the release is authored by the App. Events from an App
token DO create new workflow runs, so the existing publish + deploy workflows
cascade automatically — no rewrite of build/upload/deploy needed.

Requires repo/org secrets RELEASE_APP_ID and RELEASE_APP_KEY (see #1406);
inert until those exist.

Refs #1406

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread .github/workflows/release.yml Fixed
Set explicit permission-contents/permission-pull-requests on the
create-github-app-token step so the minted token does not inherit the App
installation's blanket permissions (zizmor: dangerous use of GitHub App tokens).
release-please only needs Contents (tags/releases) and Pull requests (release PR).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lhoupert
Copy link
Copy Markdown
Contributor Author

Addressed the zizmor code-scanning finding ("app token inherits blanket installation permissions") in e3e56ca: the create-github-app-token step now scopes the minted token to least privilege —

          permission-contents: write
          permission-pull-requests: write

so it no longer inherits the App installation's full permission set. release-please only needs Contents (tags/releases) + Pull requests (release PR). zizmor passes locally; the code-scanning alert should clear on the next scan.

developmentseed already has an org-level GitHub App for release automation
(secrets DS_RELEASE_BOT_ID / DS_RELEASE_BOT_PRIVATE_KEY). Use those instead of
provisioning a new App, so no new secrets are needed and the workflow is no
longer blocked.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lhoupert lhoupert changed the title fix: author release-please releases with a GitHub App token fix: trigger PyPI publish/deploy by authoring releases with the DS_RELEASE_BOT app token May 29, 2026
@lhoupert lhoupert marked this pull request as ready for review May 29, 2026 10:10
@lhoupert lhoupert requested a review from vincentsarago May 29, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release-please: bot-created releases don't trigger PyPI publish/deploy (2.0.3 missing from PyPI)

2 participants