diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7ca0c83..0c6388b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -210,28 +210,26 @@ jobs: - name: List packages run: ls -R ./npm shell: bash + - name: Set publishing config + run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - name: Build & Publish run: | npm config set provenance true - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc pnpm prepublishOnly if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; then npm publish --access public cd .. - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc pnpm build npm publish --access public elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+"; then npm publish --tag next --access public cd .. - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc pnpm build npm publish --tag next --access public else echo "Not a release, skipping publish" fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }}