diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9716bad..f426e5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,16 +15,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [ 14.x, 16.x, 18.x ] + node-version: [ 20.x, 22.x, 24.x ] os: [ windows-latest, ubuntu-latest, macOS-latest ] # Go steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} @@ -48,7 +48,7 @@ jobs: - name: Notify uses: sarisia/actions-status-discord@v1 # Only fire alert once - if: github.ref == 'refs/heads/main' && failure() && matrix.node-version == '14.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" @@ -60,6 +60,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 @@ -67,26 +70,22 @@ jobs: # Go steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: - node-version: lts/* + node-version: 24.x registry-url: https://registry.npmjs.org/ # Publish to npm - 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