Skip to content

Fix release workflow: token permissions + archived action - #14

Open
EdgarBabajanyan wants to merge 1 commit into
mainfrom
fix/release-workflow-permissions
Open

Fix release workflow: token permissions + archived action#14
EdgarBabajanyan wants to merge 1 commit into
mainfrom
fix/release-workflow-permissions

Conversation

@EdgarBabajanyan

Copy link
Copy Markdown
Contributor

Problem

The v0.4.0 tag run failed at the Create Release step:

##[error]Resource not accessible by integration

The workflow declares no permissions, so the default GITHUB_TOKEN is read-only and cannot create releases; the v0.4.0 release had to be created manually. The Publish to crates.io job was skipped as a knock-on (needs: create-release).

Fix

  • permissions: contents: write at the workflow level.
  • Replace archived actions/create-release@v1 (and its %0A body-escaping dance) with gh release create reading the CHANGELOG section from a file — idempotent when the release already exists, so re-running a tag build can't fail on a duplicate.

Notes

  • Publish to crates.io uses secrets.CARGO_TOKEN — confirm that secret exists before the next tagged release, or the job will fail there instead.

…elease action

The v0.4.0 tag run failed at Create Release with 'Resource not
accessible by integration' — the default GITHUB_TOKEN is read-only and
the workflow declared no permissions, so the release had to be created
manually. Grant contents:write, and swap the archived
actions/create-release@v1 (plus its brittle %0A body escaping) for gh
release create reading the CHANGELOG section from a file, skipping
cleanly when the release already exists.

Signed-off-by: Edgar Babajanyan <bedgar2005@gmail.com>
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.

1 participant