diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fbe2af3..067ee6c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,9 @@ jobs: publish: runs-on: ubuntu-latest timeout-minutes: 10 + permissions: + contents: read + id-token: write steps: - name: Checkout code uses: actions/checkout@v4 @@ -21,6 +24,9 @@ jobs: cache: npm registry-url: "https://registry.npmjs.org/" + - name: Upgrade npm for Trusted Publishing + run: npm install -g npm@latest + - name: Determine pre-release tag run: | TAG_NAME=${GITHUB_REF_NAME} @@ -50,6 +56,4 @@ jobs: run: npm run build - name: Publish - run: npm publish --access public --tag ${{ env.tag }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --provenance --access public --tag ${{ env.tag }}