Skip to content

fix(ci): grant contents write to the release job - #237

Merged
mogita merged 1 commit into
masterfrom
fix/release-contents-write
Sep 10, 2026
Merged

fix(ci): grant contents write to the release job#237
mogita merged 1 commit into
masterfrom
fix/release-contents-write

Conversation

@mogita

@mogita mogita commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Problem

The Release workflow publishes to PyPI first and then creates the tag and GitHub release with GITHUB_TOKEN, but the least-privilege change pinned the workflow to contents: read. The same setup just failed in stream-chat-go with Error 403: Resource not accessible by integration. Here it would fail after the PyPI upload, leaving a published package with no tag.

Solution

contents: write on the Release workflow, the minimum ncipollo/release-action needs to push a tag and create a release. pull-requests stays read-only.

How to verify

  1. Merge this before running the next Create release PR.
  2. Merge that release-* PR into master; the Create release on GitHub step passes and the tag appears under Releases.

🤖 Generated with Claude Code

ncipollo/release-action creates the tag and release with GITHUB_TOKEN, which needs contents write. The least-privilege change left it at read, and this workflow uploads to PyPI before that step, so a failure would leave a package without a tag.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mogita
mogita merged commit 4c7834d into master Sep 10, 2026
5 of 10 checks passed
@mogita
mogita deleted the fix/release-contents-write branch September 10, 2026 12:46
@github-actions github-actions Bot mentioned this pull request Sep 10, 2026
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.

1 participant