From df1644d3bf636208430e58760eaadad8034ba99b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 12:46:59 +0000 Subject: [PATCH] chore: migrate npm publishing from token to OIDC Co-Authored-By: David Konigsberg --- .github/workflows/ci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8361069..ffd2ef8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,12 +45,17 @@ jobs: needs: [ compile, test ] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - name: Checkout repo uses: actions/checkout@v6 - name: Set up node uses: actions/setup-node@v6 + with: + registry-url: https://registry.npmjs.org - name: Install pnpm uses: pnpm/action-setup@v4 @@ -63,16 +68,10 @@ jobs: - name: Publish to npm run: | - npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} - publish() { # use latest npm to ensure OIDC support - npx -y npm@latest publish "$@" - } if [[ ${GITHUB_REF} == *alpha* ]]; then - publish --access public --tag alpha + npm publish --access public --tag alpha --provenance elif [[ ${GITHUB_REF} == *beta* ]]; then - publish --access public --tag beta + npm publish --access public --tag beta --provenance else - publish --access public - fi - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + npm publish --access public --provenance + fi \ No newline at end of file