When trying to run the release pipeline I showed you last Thursday, it originally failed with the following error message:
Error: Resource not accessible by integration
Here is the original Github Actions workflow I was using:
The error above was caused by the fact that the Github Actions workflow couldn’t access the Releases inside Github. There are multiple ways to fix this:
- Create a separate PAT (Personal Access Token) with specific rights needed to create a release
- Override the default permissions in the workflow file itself
- Update the permissions in the Github Actions settings
I decided to go for the second option and updated the workflow file to include the specific permission needed:
Remark: It can take some time to identify the right permission you need, so certainly check out the documentation or ask Github Copilot for help.
More information
Controlling permissions for GITHUB_TOKEN - GitHub Docs
Github–Create a new release–The automated version (bartwullems.blogspot.com)