From c774dea6788273caf5a195d627c49025d7fa9b5b Mon Sep 17 00:00:00 2001 From: filmaj Date: Tue, 23 Dec 2025 14:09:19 -0500 Subject: [PATCH 1/2] chore: move to oidc npm publishing --- .github/workflows/build.yml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3edb3b..dddb412 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,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: ${{ matrix.node-version }} @@ -67,15 +67,7 @@ jobs: npm install pip3 install -r requirements.txt - - name: Test (Node.js <= 16.x) - if: matrix.node-version <= '16.x' - run: npm run test:nolint - env: - CI: true - CI_OS: ${{ matrix.os }} - - name: Test - if: matrix.node-version > '16.x' run: npm test env: CI: true @@ -84,7 +76,7 @@ jobs: - name: Notify uses: sarisia/actions-status-discord@v1 # Only fire alert once - if: github.ref == 'refs/heads/main' && failure() && matrix.node-version == '22.x' && matrix.os == 'ubuntu-latest' + if: github.ref == 'refs/heads/main' && failure() && matrix.node-version == '24.x' && matrix.os == 'ubuntu-latest' with: webhook: ${{ secrets.DISCORD_WEBHOOK }} title: "build and test" @@ -96,6 +88,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 @@ -103,10 +98,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/ @@ -115,14 +110,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 2322313cfbbd3653078ceea62b91ce16c4ebb8de Mon Sep 17 00:00:00 2001 From: filmaj Date: Tue, 23 Dec 2025 14:11:32 -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 dddb412..5785c9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,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