ci: ensure latest npm CLI and clean OIDC env in publish workflow
Publish PeerTube Plugin to npm / publish (push) Canceled after 0s

This commit is contained in:
Enes Yakıştır
2026-12-01 19:19:50 +03:00
parent 8411c5c23d
commit 6d49d3666e
+3 -4
View File
@@ -27,7 +27,6 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '24' node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Syntax check main plugin entrypoint - name: Syntax check main plugin entrypoint
run: node --check main.js run: node --check main.js
@@ -47,10 +46,10 @@ jobs:
fi fi
if [ -n "$NPM_TOKEN_SECRET" ]; then 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 npm publish --access public
else else
# Clear placeholder token so npm Trusted Publishing (OIDC) can authenticate automatically npm install -g npm@latest
npm config delete //registry.npmjs.org/:_authToken || true npm -v
npm publish --provenance --access public npm publish --provenance --access public
fi fi