Skip to content

Commit 71dd39c

Browse files
authored
Merge pull request #8 from gabrielbarth/sdx
chore: set workflow to publish on npmjs only
2 parents 4135ae6 + 63e3d66 commit 71dd39c

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Package
1+
name: Publish Package to npmjs
22

33
on:
44
push:
@@ -8,27 +8,30 @@ on:
88
jobs:
99
publish:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
1114

1215
steps:
1316
- name: Checkout code
14-
uses: actions/checkout@v4.2.2
17+
uses: actions/checkout@v4
1518

1619
- name: Setup Node.js
17-
uses: actions/setup-node@v4.1.0
20+
uses: actions/setup-node@v4
1821
with:
1922
node-version: 18
20-
registry-url: https://npm.pkg.github.com
23+
registry-url: "https://registry.npmjs.org"
2124

2225
- name: Install dependencies
2326
run: npm install
2427

2528
- name: Build package
2629
run: npm run build
2730

28-
- name: Set up npm authentication
29-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > ~/.npmrc
31+
# - name: Set up npm authentication
32+
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > ~/.npmrc
3033

3134
- name: Publish to GitHub Packages
32-
run: npm publish
35+
run: npm publish --provenance --access public
3336
env:
34-
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)