Skip to content

Fix release workflow 403 error by adding contents:write permission#82

Merged
kjy5 merged 2 commits into
mainfrom
copilot/fix-release-action-error
Oct 29, 2025
Merged

Fix release workflow 403 error by adding contents:write permission#82
kjy5 merged 2 commits into
mainfrom
copilot/fix-release-action-error

Conversation

Copilot AI commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

The release workflow failed with "Error 403: Resource not accessible by integration" when attempting to create GitHub releases via ncipollo/release-action@v1.

Changes

  • Added contents: write permission to the publish-to-pypi job in .github/workflows/release.yml

The job already had id-token: write for PyPI publishing but lacked contents: write required by the release action to access the GitHub Releases API.

permissions:
  id-token: write
  contents: write  # Added to enable release creation
Original prompt

in the make release step of the releases yml workflow I have the following error:

1s
Run ncipollo/release-action@v1
with:
tag: v1.0.1
generateReleaseNotes: true
prerelease: false
immutableCreate: false
makeLatest: legacy
omitBody: false
omitBodyDuringUpdate: false
omitDraftDuringUpdate: false
omitName: false
omitNameDuringUpdate: false
omitPrereleaseDuringUpdate: false
removeArtifacts: false
replacesArtifacts: true
skipIfReleaseExists: false
token: ***
updateOnlyUnreleased: false
env:
pythonLocation: /opt/hostedtoolcache/Python/3.13.7/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.13.7/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.13.7/x64/lib
Error: Error 403: Resource not accessible by integration - https://docs.github.com/rest/releases/releases#generate-release-notes-content-for-a-release
Run ncipollo/release-action@v1
with:
tag: v1.0.1
generateReleaseNotes: true
prerelease: false
immutableCreate: false
makeLatest: legacy
omitBody: false
omitBodyDuringUpdate: false
omitDraftDuringUpdate: false
omitName: false
omitNameDuringUpdate: false
omitPrereleaseDuringUpdate: false
removeArtifacts: false
replacesArtifacts: true
skipIfReleaseExists: false
token: ***
updateOnlyUnreleased: false
env:
pythonLocation: /opt/hostedtoolcache/Python/3.13.7/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.13.7/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.13.7/x64/lib
Error: Error 403: Resource not accessible by integration - https://docs.github.com/rest/releases/releases#generate-release-notes-content-for-a-release

Fix it


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: kjy5 <82800265+kjy5@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error in make release step of workflow Fix release workflow 403 error by adding contents:write permission Oct 29, 2025
Copilot AI requested a review from kjy5 October 29, 2025 19:16
@kjy5
kjy5 marked this pull request as ready for review October 29, 2025 19:18
@kjy5
kjy5 enabled auto-merge (squash) October 29, 2025 19:19
@kjy5
kjy5 merged commit 9c9148b into main Oct 29, 2025
5 checks passed
@kjy5
kjy5 deleted the copilot/fix-release-action-error branch October 29, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants