From f82ebc519b0ca41e123c155c34b333473a221df6 Mon Sep 17 00:00:00 2001 From: filmaj Date: Tue, 23 Dec 2025 13:36:19 -0500 Subject: [PATCH 1/2] chore: move to oidc npm publishing --- .github/workflows/build.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb86bf4..cc669a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: # Go steps: - name: Check out repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Windows if: matrix.os == 'windows-latest' @@ -29,7 +29,7 @@ jobs: npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe" - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} @@ -67,6 +67,9 @@ jobs: # Publish to package registries publish: # Setup + permissions: + id-token: write # Required for OIDC + contents: read needs: build if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest @@ -74,10 +77,10 @@ jobs: # Go steps: - name: Check out repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: lts/* registry-url: https://registry.npmjs.org/ @@ -86,14 +89,10 @@ jobs: - name: Publish @RC to npm if: contains(github.ref, 'RC') run: npm publish --tag RC - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish @latest to npm if: contains(github.ref, 'RC') == false #'!contains()'' doesn't work lol run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Notify uses: sarisia/actions-status-discord@v1 From edf318c241f0eba6ae6ba0bf69300c8a5d22daca Mon Sep 17 00:00:00 2001 From: filmaj Date: Tue, 23 Dec 2025 13:40:02 -0500 Subject: [PATCH 2/2] use node 24.x to do publishing, as we need a newer npm version for trusted publishing --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc669a7..ee39664 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,7 +82,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v6 with: - node-version: lts/* + node-version: 24.x registry-url: https://registry.npmjs.org/ # Publish to npm