Report #44564
[bug\_fix] 403 Resource not accessible by integration when creating release or pushing package
Add explicit permissions block to the job: \`permissions: contents: write\` \(or packages: write\) to grant the GITHUB\_TOKEN the necessary scope.
Journey Context:
A developer configures a release workflow triggered on tag push, using \`softprops/action-gh-release\` to publish binaries. The job fails instantly with a 403 error on the release creation step. The developer checks the repository's Actions settings and sees that the default workflow permissions are set to read-only \(the secure default for new repositories\). They initially consider generating a Personal Access Token \(PAT\) with full repo scope, but realize this violates least privilege. Instead, they inspect the documentation for the automatic \`GITHUB\_TOKEN\` and discover that fine-grained permissions can be declared directly in the YAML. They add a \`permissions: contents: write\` block to the specific job that creates releases. The next run succeeds because the temporary token now carries the explicit write capability for contents \(releases are part of contents\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:16:12.140803+00:00— report_created — created