File tree Expand file tree Collapse file tree 1 file changed +34
-7
lines changed
Expand file tree Collapse file tree 1 file changed +34
-7
lines changed Original file line number Diff line number Diff line change 11name : Publish WASM Package
22
33on :
4- workflow_run :
5- workflows : ["Build WASM Package"]
6- types :
7- - completed
4+ push :
5+ branches : [main]
86
97jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+
14+ - name : Set up Rust toolchain
15+ uses : dtolnay/rust-toolchain@stable
16+ with :
17+ targets : wasm32-unknown-unknown
18+
19+ - name : Install wasm-pack
20+ run : curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | bash
21+
22+ - name : Build library
23+ run : wasm-pack build --scope libresplit --target web --release
24+
25+ - name : Upload pkg
26+ uses : actions/upload-artifact@v4
27+ with :
28+ name : pkg
29+ path : pkg
30+
1031 publish :
11- if : ${{ github.event.workflow_run.conclusion == 'success' }}
1232 runs-on : ubuntu-latest
33+ needs : build
1334
1435 steps :
15- - name : Checkout Repository
36+ - name : Checkout
1637 uses : actions/checkout@v4
1738
39+ - name : Download pkg
40+ uses : actions/download-artifact@v4
41+ with :
42+ name : pkg
43+ path : pkg
44+
1845 - name : Set up Node.js
1946 uses : actions/setup-node@v4
2047 with :
2653 cd pkg
2754 npm publish --access public
2855 env :
29- NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments