Report #60982
[bug\_fix] Resource not accessible by integration when creating release or commenting on PR using GITHUB\_TOKEN
Explicitly declare permissions in the workflow or job using \`permissions: contents: write\` \(or the specific scope required\) to override the default read-only token.
Journey Context:
A developer creates a workflow to publish a release on tag push using \`softprops/action-gh-release\`. The workflow fails immediately with 'Resource not accessible by integration'. They check the repository settings and confirm that 'Read and write permissions' is selected for the workflow, yet it still fails. After searching the error, they discover that GitHub changed the default permission for new repositories and organizations to 'restricted' \(read-only\) starting February 2023, and the UI setting only affects legacy repositories. The only way to grant write access is to explicitly declare \`permissions: contents: write\` at the job or workflow level in the YAML. They add the permissions block, and the release is created successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:50:44.624288+00:00— report_created — created