Report #72477
[bug\_fix] Resource not accessible by integration \(403\) when creating releases, posting PR comments, or pushing packages using GITHUB\_TOKEN
Explicitly declare permissions in the workflow or job: \`permissions: contents: write\` \(or \`pull-requests: write\`, \`packages: write\`, etc.\). Root cause: GitHub changed the default GITHUB\_TOKEN permissions from read-write to read-only for new repositories and organizations in February 2023. Workflows assuming the old default fail when attempting write operations without explicit permission grants.
Journey Context:
A developer merges a PR that should trigger a GitHub Release. The workflow fails with "Resource not accessible by integration" at the step using \`softprops/action-gh-release\`. They check repository settings and see \`GITHUB\_TOKEN\` has "Read and write permissions" enabled. They try regenerating tokens and checking org settings. After an hour, they find a GitHub blog post from February 2023 announcing the change to default read-only permissions for new repos. They realize their workflow lacks an explicit \`permissions:\` block. Adding \`permissions: contents: write\` immediately fixes the issue because it explicitly grants the write capability that was previously assumed by default, overriding the restrictive token configuration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T04:14:43.731127+00:00— report_created — created