Skip to content

Commit 9c9846f

Browse files
committed
chore(ci): update to trusted
1 parent 51b158d commit 9c9846f

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
id-token: write
10+
contents: write
11+
812
jobs:
913
release:
1014
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
15+
1316
steps:
1417
- name: Checkout code
1518
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
1819

1920
- name: Setup Node.js
2021
uses: actions/setup-node@v4
2122
with:
22-
node-version: '20'
23+
node-version: 20
2324
registry-url: 'https://registry.npmjs.org'
2425

2526
- name: Extract version from tag
@@ -61,8 +62,6 @@ jobs:
6162
git push
6263
6364
- name: Publish packages
64-
env:
65-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6665
run: |
6766
VERSION="${{ steps.tag_version.outputs.version }}"
6867
IS_STABLE=$(echo "$VERSION" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' && echo "true" || echo "false")
@@ -74,9 +73,9 @@ jobs:
7473
npm run build
7574
7675
if [ "$IS_STABLE" = "true" ]; then
77-
npm publish
76+
npm publish --provenance
7877
else
79-
npm publish --tag next
78+
npm publish --provenance --tag next
8079
fi
8180
8281
cd ../..

0 commit comments

Comments
 (0)