Skip to content

Commit 78405d5

Browse files
committed
fix(ci)?: oidc trusted publisher
1 parent f2ca121 commit 78405d5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
branches:
1111
- main
1212

13+
permissions:
14+
id-token: write # Required for OIDC
15+
contents: read
16+
1317
name: Build & release
1418

1519
jobs:
@@ -18,19 +22,17 @@ jobs:
1822
steps:
1923
- uses: actions/checkout@v4
2024

21-
- uses: actions/cache@v4
22-
with:
23-
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
24-
restore-keys: pnpm-
25-
path: |
26-
~/.pnpm-store
27-
~/.cache/pnpm
28-
**/node_modules
29-
3025
- uses: pnpm/action-setup@v4
3126
with:
3227
version: 10
3328
run_install: false
29+
30+
- name: Install Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20
34+
registry-url: 'https://registry.npmjs.org'
35+
cache: 'pnpm'
3436

3537
- run: pnpm install
3638

@@ -59,6 +61,4 @@ jobs:
5961
- run: pnpm build
6062

6163
- if: github.ref == 'refs/heads/main'
62-
run: |
63-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
64-
pnpm publish --no-git-checks --tag ${{ env.version_tag }}
64+
run: pnpm publish --no-git-checks --tag ${{ env.version_tag }}

0 commit comments

Comments
 (0)