action-gh-release
action-gh-release copied to clipboard
GitHub error 403 undefined
I'm getting the following error:
👩🏭 Creating new GitHub release for tag latest...
⚠️ GitHub release failed with status: 403
undefined
retrying... (2 retries remaining)
👩🏭 Creating new GitHub release for tag latest...
⚠️ GitHub release failed with status: 403
undefined
retrying... (1 retries remaining)
👩🏭 Creating new GitHub release for tag latest...
⚠️ GitHub release failed with status: 403
undefined
retrying... (0 retries remaining)
❌ Too many retries. Aborting...
Error: Too many retries.
https://github.com/CryZe/game-maker-auto-splitter/actions/runs/7301685228/job/19899026066#step:5:10
This is how I invoke the action:
- name: Release
if: github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v1
with:
files: target/wasm32-unknown-unknown/release/game_maker_auto_splitter.wasm
name: Latest
tag_name: latest
body: This contains the latest version of the auto splitter.
Same error :(
Same here:
Here is one solution. Or look into one of the other open 403 Error issues in this repo.
Hey, i found the solution.
In the repository settings, go to Actions -> General
Allow Read and Write Permissions for Github Workflows and save changes.
If your repository is from an organization you will have to do an extra step, go to Organization Settings -> Actions -> General
You should also be able to specify that in the job with permissions such as
create-release:
name: Create draft release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create Release
uses: softprops/action-gh-release@v1
# rest of code here
Both parts are required:
-
Workflow permissions - suggested by @estebanfern https://github.com/softprops/action-gh-release/issues/400#issuecomment-1870332450
-
Configuring the permissions at the workflow file
permissions:
contents: write
, suggested by @eggsy84
@koss110 - I don't think you need both - it's more like you need either.
You can enable write permissions for all workflows in a repo or organization via the Settings->Actions->General GUI option.
You can enable write permissions for one workflow via the contents: write
permission in the .yaml file.
In the past the default option was read/write, but it changed about a year ago. See this for more details: https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
Can confirm that adding this to YAML is enough:
permissions:
contents: write
It is not necessary to manually edit the permissions in the GitHub UI.