Report #29845
[bug\_fix] Resource not accessible by integration \(403\) when creating GitHub Release using GITHUB\_TOKEN
Add explicit job permissions \`permissions: contents: write\` to grant the GITHUB\_TOKEN write access to repository contents for creating releases.
Journey Context:
The developer sets up a workflow to build artifacts and create a GitHub Release using softprops/action-gh-release. It works perfectly on their personal fork, but fails in the organization repository with a 403 "Resource not accessible by integration" error. They verify that they are using $\{\{ secrets.GITHUB\_TOKEN \}\} and that it is spelled correctly. They check the repository settings and confirm that Actions are enabled and that the workflow has access. After extensive searching through community forums, they discover that GitHub changed the default permissions for the GITHUB\_TOKEN to read-only for security reasons in newer repositories. The developer examines the workflow run logs under "Set up job" and sees that the token only has read permissions for contents. The fix requires explicitly declaring the required permissions in the workflow YAML using the permissions key at the job level, specifically \`contents: write\`, which expands the token's scope for that specific job.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:29:06.317708+00:00— report_created — created