xresloader/upload-to-github-release

Resource not accessible by integration

Closed this issue · 3 comments

I have a job step like the following.

      - name: 'Publish binary to release'
        continue-on-error: true
        uses: xresloader/upload-to-github-release@v1
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
        with:
          file: ${{env.APP_NAME}}-${{matrix.label}}-${{steps.branch_name.outputs.PROJECT_VERSION}}*
          tags: true
          draft: false
          overwrite: true

When I make a push, I expect this job create a release and push some files. But I got Try to create release xxx for xxx failed: Resource not accessible by integration error.

image

owent commented

How long did this job run? The ${{secrets.GITHUB_TOKEN}} will expire after a long time.
Do GITHUB_TOKEN has write permissions in your repository?

I need to update the settings on Action-General-Workflow permissions. The default is Read repository contents permission.

image

see also https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions.

How long did this job run? The ${{secrets.GITHUB_TOKEN}} will expire after a long time. Do GITHUB_TOKEN has write permissions in your repository?

It is just a few seconds, the problem is GITHUB_TOKEN does not have write permissions. Thanks! 😃