diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e473aa8..43eecb7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,9 +14,9 @@ jobs: fail-fast: false steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Use Node v${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: ${{ matrix.node-version }} - name: Install Dependencies @@ -28,6 +28,6 @@ jobs: - name: Test run: npm run test - name: Report Test Coverage - uses: coverallsapp/github-action@v2 + uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bbbbe86..5500c4f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,9 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 20 - name: Install Dependencies @@ -29,21 +31,21 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 22.x registry-url: 'https://registry.npmjs.org' cache: 'npm' + - run: npm install -g npm@~11.10.0 # Work-around for https://github.com/npm/cli/issues/9151#issuecomment-4131466208 + - run: npm install -g npm@latest - run: npm ci - run: npm version ${TAG_NAME} --git-tag-version=false env: TAG_NAME: ${{ github.ref_name }} - - run: npm publish --provenance --access public --tag next + - run: npm stage publish --provenance --access public --tag next if: "github.event.release.prerelease" - env: - NODE_AUTH_TOKEN: ${{ secrets.npm_token }} - - run: npm publish --provenance --access public + - run: npm stage publish --provenance --access public if: "!github.event.release.prerelease" - env: - NODE_AUTH_TOKEN: ${{ secrets.npm_token }}