Skip to content

Commit bf526de

Browse files
authored
Publish with trusted modules (#45)
1 parent 948a6da commit bf526de

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

.github/workflows/publish.yaml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,24 @@ jobs:
1414
id-token: write
1515

1616
steps:
17-
- uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
2020

21-
- uses: actions/setup-node@v4
22-
with:
23-
node-version: 22.x
24-
cache: npm
25-
registry-url: https://registry.npmjs.org
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 22.x
24+
cache: npm
25+
registry-url: https://registry.npmjs.org
2626

27-
- run: npm ci
28-
- run: npm run build
27+
- run: npm ci
28+
- run: npm run build
2929

30-
- name: Publish to NPM
31-
env:
32-
NODE_AUTH_TOKEN: ${{ secrets.PUBLIC_NPM_REGISTRY_TOKEN }}
33-
run: npm publish --access public
34-
35-
- name: Publish to GitHub Packages
36-
env:
37-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
run: |
39-
npm config set //npm.pkg.github.com/:_authToken "$NODE_AUTH_TOKEN"
40-
npm publish --registry https://npm.pkg.github.com
30+
- name: Publish to NPM
31+
run: npm publish --access public
32+
- name: Publish to GitHub Packages
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
run: |
36+
npm config set //npm.pkg.github.com/:_authToken "$NODE_AUTH_TOKEN"
37+
npm publish --registry https://npm.pkg.github.com

0 commit comments

Comments
 (0)