diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2cf2bec..f03e3f7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,6 +14,7 @@ jobs: contents: write issues: write pull-requests: write + # Required for npm trusted publishing (OIDC) and provenance id-token: write steps: - uses: actions/checkout@v4 @@ -23,13 +24,12 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 24 - registry-url: https://registry.npmjs.org/ cache: npm + # Trusted publishing (OIDC) requires npm >= 11.5.1 + - run: npm install -g npm@latest - run: npm ci - run: npm run lint - run: npm test - run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: "true"