From f0bbbfd567bed9f83c647e57681cbc1dd5845bc5 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Nov 2026 22:27:52 +0000 Subject: [PATCH 1/2] Publish to npm on release published, add manual publish softprops/action-gh-release now creates the release as a draft and then finalizes it, and GitHub doesn't fire release "created" for drafts, so npm-publish.yml never ran for v3.0.0. Trigger on "published" instead, and add a workflow_dispatch with a tag input to publish an existing tag. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QhgcNyPGK62bg5XGGZhpkx --- .github/workflows/npm-publish.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 90dad13..60711ec 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,8 +1,16 @@ name: NPM Publish Package on: + # "published", not "created": GitHub doesn't fire "created" for releases that + # start as drafts, which softprops/action-gh-release now does. release: - types: [created] + types: [published] + # Manual fallback to publish an existing tag, e.g. if a release run was missed. + workflow_dispatch: + inputs: + tag: + description: "Tag to publish, e.g. v3.0.0" + required: true permissions: id-token: write # Required for OIDC @@ -13,6 +21,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag || github.ref }} - uses: actions/setup-node@v4 with: From ef4b79e44153235fd9e9cb54580830e4c28d7ab3 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Nov 2026 23:04:27 +0000 Subject: [PATCH 2/2] Release: pass RELEASE_TOKEN as the action's token input softprops/action-gh-release reads its `token` input (default github.token) and ignores a GITHUB_TOKEN env var, so v3.0.0 was created by github-actions[bot]. Events from GITHUB_TOKEN don't start other workflows, which is the main reason npm-publish.yml didn't run. Found by the jpeg-encoder thread (jpeg-encoder #10). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QhgcNyPGK62bg5XGGZhpkx --- .github/workflows/npm-publish.yml | 4 ++-- .github/workflows/release.yml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 60711ec..3b0f034 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,8 +1,8 @@ name: NPM Publish Package on: - # "published", not "created": GitHub doesn't fire "created" for releases that - # start as drafts, which softprops/action-gh-release now does. + # "published" fires whether a release is created directly or finalized from a + # draft (softprops/action-gh-release creates a draft, then finalizes it). release: types: [published] # Manual fallback to publish an existing tag, e.g. if a release run was missed. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d3c96f..10a5686 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,5 +138,7 @@ jobs: target_commitish: ${{ steps.bump.outputs.sha }} name: Release v${{ steps.version.outputs.version }} generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + # Must be the `token` input: the action ignores a GITHUB_TOKEN env var + # and would create the release as github-actions[bot], whose events + # don't trigger npm-publish.yml. + token: ${{ secrets.RELEASE_TOKEN }}