Skip to content

ci: use GH_RELEASE_TOKEN so release tag triggers publish - #7

Merged
mlnchk merged 1 commit into
mainfrom
fix/release-pat-token
Aug 3, 2026
Merged

ci: use GH_RELEASE_TOKEN so release tag triggers publish#7
mlnchk merged 1 commit into
mainfrom
fix/release-pat-token

Conversation

@mlnchk

@mlnchk mlnchk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

Tags/releases created by `onPushToMain.yml` use the default `GITHUB_TOKEN`. GitHub's anti-recursion rule blocks such tags from triggering other workflows, so `onTag.yml` (`push: tags: v*`) never auto-fires — the tag and release appear, but nothing publishes to npm. Manual dispatch on `main` also fails because the `publish` environment only allows `v*` tag refs.

Fix

Use the `GH_RELEASE_TOKEN` PAT for checkout and the release-action. A tag created by a PAT triggers downstream workflows normally, so `onTag.yml` fires on the `v*` tag and satisfies the environment's tag policy. Fully automatic, no manual dispatch.

Requires

  • `GH_RELEASE_TOKEN` repo secret with Contents: write (already added).

`onTag.yml` unchanged.

Tags/releases created with the default GITHUB_TOKEN don't trigger
onTag.yml (GitHub anti-recursion), so npm publish never auto-fires.
Use a PAT for checkout push and the release-action instead.
@mlnchk
mlnchk merged commit f59161c into main Aug 3, 2026
4 checks passed
@mlnchk
mlnchk deleted the fix/release-pat-token branch August 3, 2026 11:09
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