1
0
mirror of https://github.com/Unleash/unleash.git synced 2026-01-05 20:06:22 +01:00

chore: use id-token write and npm_config_provenance in npm publish (#11134)

https://linear.app/unleash/issue/2-4082/fix-npm-publish-in-unleash-releaseyaml

Uses `NPM_CONFIG_PROVENANCE` in npm publish.
This commit is contained in:
Nuno Góis 2025-12-12 10:48:48 +00:00 committed by GitHub
parent 80fbaf1baf
commit 0187efcc00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,8 @@
name: 'Publish to npm'
permissions:
id-token: write
on:
workflow_dispatch:
inputs:
@ -16,17 +20,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
with:
ref: v${{ inputs.version }} # tag that should be created by the caller workflow
- name: Setup to npm
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
@ -37,6 +36,8 @@ jobs:
run: |
yarn install --immutable
- name: Publish to npm
env:
NPM_CONFIG_PROVENANCE: true
run: |
LATEST=$(npm show unleash-server version)
TAG=$(node scripts/npm-tag.js $LATEST)