mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
ci: switch release to npm Trusted Publisher (OIDC, environment: release), drop NPM_TOKEN
This commit is contained in:
@@ -11,6 +11,7 @@ permissions:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
environment: release # must match the npm Trusted Publisher config
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
@@ -35,7 +36,9 @@ jobs:
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
# prepublishOnly runs typecheck + tests + build as the gate
|
||||
# Auth via npm Trusted Publisher (OIDC) - no token needed.
|
||||
# Requires npm >= 11.5; Node 22 ships older, so upgrade npm first.
|
||||
- if: steps.check.outputs.skip == 'false'
|
||||
run: npm publish --access public --provenance
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: |
|
||||
npm install -g npm@latest
|
||||
npm publish --access public --provenance
|
||||
|
||||
Reference in New Issue
Block a user