Report #3780
[bug\_fix] Workflow fails with 'Resource not accessible by integration' or 403 Forbidden when attempting to create a release, push a tag, or open a pull request using GITHUB\_TOKEN.
Explicitly declare the required permissions in the workflow YAML \(e.g., \`permissions: contents: write\` at the job or workflow level\) or change the repository's default setting to 'Read and write permissions' under Settings > Actions > General > Workflow permissions.
Journey Context:
A developer adds a step to their workflow that uses \`gh release create\` or an action like \`softprops/action-gh-release\` to publish a release when a tag is pushed. The workflow worked perfectly in their old repository but fails consistently in a newly created repository with a 403 error. They inspect the job logs and see the GITHUB\_TOKEN is being used, but the API call returns 'Resource not accessible by integration'. They search the error and discover that GitHub changed the default workflow permissions to read-only for all new repositories and organizations starting in February 2023. Realizing the token lacks write access, they add a \`permissions: contents: write\` block to their job, granting the token explicit write access to repository contents, and the release is created successfully on the next run.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:12:04.041251+00:00— report_created — created