ci: Switch to OIDC trusted publishing for npm (no token needed)
This commit is contained in:
@@ -4,14 +4,17 @@ stages:
|
||||
semantic-release:
|
||||
stage: release
|
||||
image: node:lts-alpine
|
||||
id_tokens:
|
||||
NPM_ID_TOKEN:
|
||||
aud: "npm:registry.npmjs.org"
|
||||
SIGSTORE_ID_TOKEN:
|
||||
aud: sigstore
|
||||
before_script:
|
||||
- apk add git openssh
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
||||
- ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
- chmod 600 ~/.ssh/id_ed25519
|
||||
- export NPM_TOKEN="${NODE_AUTH_TOKEN}"
|
||||
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
|
||||
- npm install
|
||||
- npm run build
|
||||
script:
|
||||
|
||||
Reference in New Issue
Block a user