GitHub Actions softprops/action-gh-release "Resource not accessible by integration"
softprops/action-gh-release cannot create the release or upload assets because the token lacks contents: write, or because the workflow did not run on a tag so there is no tag to release.
What this error means
The release step fails with "Resource not accessible by integration" when creating the release or uploading assets, or it errors that no tag was found for the release.
Actions log
⚠️ GitHub release failed with status: 403
{"message":"Resource not accessible by integration"}Common causes
Missing contents: write
Creating a release and uploading assets requires contents: write. The default read-only token returns 403 "Resource not accessible by integration".
No tag for the release
The action attaches a release to a tag. Running on a branch push without a tag, or without a tag_name input, leaves it nothing to release.
How to fix it
Grant contents: write and trigger on tags
.github/workflows/release.yml
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: softprops/action-gh-release@v2
with:
files: dist/*Supply a tag explicitly when not tag-triggered
- Pass tag_name when the workflow is not triggered by a tag push.
- Confirm the tag exists or let the action create it from the current ref.
- Keep contents: write at the job (not just workflow) scope if you narrowed permissions per job.
How to prevent it
- Trigger release workflows on tag pushes and grant contents: write.
- Provide tag_name when releasing from a non-tag event.
- Scope the elevated permission to the release job only.
Related guides
GitHub Actions peter-evans/create-pull-request 403 / Cannot Create PRFix peter-evans/create-pull-request failing to push or open a PR - missing pull-requests/contents write, or t…
GitHub Actions docker/metadata-action Produces Empty TagsFix docker/metadata-action emitting no tags - a missing images input, tag rules that match no event, or readi…
GitHub Actions actions/configure-pages "Pages site failed" / Not EnabledFix actions/configure-pages failing - GitHub Pages not enabled with the Actions source, or a missing pages: w…