From 7692e715ab13fb54073180bc610342805a485f4a Mon Sep 17 00:00:00 2001 From: Duncan Schulze <13733349+duncaan@users.noreply.github.com> Date: Mon, 13 Jul 2026 11:47:09 -0400 Subject: [PATCH 1/2] feat: add GitHub Actions workflow for NPM publishing --- .github/workflows/publish.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..05f0eea --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,26 @@ +name: Publish + +on: + workflow_run: + workflows: ["Test"] + types: [completed] + branches: [master, main] + +jobs: + npm-publish: + if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-node@v6 + with: + node-version: 24 + registry-url: 'https://registry.npmjs.org' + + - run: NODE_AUTH_TOKEN="" npm publish --access public --provenance + name: Publish to NPM + continue-on-error: true From 82901f5528bb94ab40a6675ac41cfc00887b094a Mon Sep 17 00:00:00 2001 From: Duncan Schulze <13733349+duncaan@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:02:06 -0400 Subject: [PATCH 2/2] fix: update permissions for npm publish job and remove continue-on-error --- .github/workflows/publish.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 05f0eea..900677d 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,7 +11,7 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} runs-on: ubuntu-latest permissions: - contents: write + contents: read id-token: write steps: @@ -23,4 +23,3 @@ jobs: - run: NODE_AUTH_TOKEN="" npm publish --access public --provenance name: Publish to NPM - continue-on-error: true