Skip to content

Commit 3692c7d

Browse files
committed
Publish to npmjs.com
1 parent 2517dc6 commit 3692c7d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ on:
44
push:
55
branches: [main]
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
711
jobs:
8-
build-and-publish:
12+
publish:
913
runs-on: ubuntu-latest
14+
1015
steps:
1116
- name: Checkout
1217
uses: actions/checkout@v4
@@ -17,18 +22,17 @@ jobs:
1722
targets: wasm32-unknown-unknown
1823

1924
- name: Install wasm-pack
20-
run: curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | bash
25+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
2126

22-
- name: Build library
27+
- name: Build WASM library
2328
run: wasm-pack build --scope libresplit --target web --release
2429

2530
- name: Set up Node.js
2631
uses: actions/setup-node@v4
2732
with:
28-
node-version: '20'
29-
registry-url: 'https://npm.pkg.github.com'
33+
node-version: 20
34+
registry-url: "https://registry.npmjs.org"
3035

31-
- name: Build and Publish library
32-
run: wasm-pack publish --target web --access public
33-
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
- name: Publish to npm
37+
run: |
38+
wasm-pack publish --access public

0 commit comments

Comments
 (0)