diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9f778a3..190918b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,7 +27,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '24' - registry-url: 'https://registry.npmjs.org' - name: Syntax check main plugin entrypoint run: node --check main.js @@ -47,10 +46,10 @@ jobs: fi if [ -n "$NPM_TOKEN_SECRET" ]; then - npm config set //registry.npmjs.org/:_authToken="$NPM_TOKEN_SECRET" + printf "//registry.npmjs.org/:_authToken=%s\n" "$NPM_TOKEN_SECRET" > ~/.npmrc npm publish --access public else - # Clear placeholder token so npm Trusted Publishing (OIDC) can authenticate automatically - npm config delete //registry.npmjs.org/:_authToken || true + npm install -g npm@latest + npm -v npm publish --provenance --access public fi