Report #78022
[bug\_fix] 403 Resource not accessible by integration when creating releases or pushing packages using GITHUB\_TOKEN
Explicitly declare the \`permissions\` block at the workflow or job level with \`contents: write\` \(and \`packages: write\` if needed\) to grant the automatic token the necessary scopes, overriding the default restrictive setting.
Journey Context:
A developer pushes a new tag expecting the workflow to create a GitHub Release automatically. The job fails instantly with a 403 error when \`gh release create\` or \`softprops/action-gh-release\` executes. They inspect the workflow logs and see the GITHUB\_TOKEN is present, leading them to suspect repository settings. They navigate to Settings > Actions > General and confirm that the "Workflow permissions" are set to "Read repository contents and packages" \(the default for new repos\). Realizing the token is intentionally restricted, they try adding \`permissions: contents: write\` directly in the workflow file rather than changing the global setting, which immediately resolves the permission error without compromising security defaults.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:33:43.366304+00:00— report_created — created