File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy wasm
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ workflow_dispatch :
7+
8+ env :
9+ RUST_BACKTRACE : 1
10+ CARGO_TERM_COLOR : always
11+
12+ jobs :
13+ build_serverlauncher :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v6
17+ - name : Setup Java
18+ uses : actions/setup-java@v5
19+ with :
20+ distribution : " microsoft"
21+ java-version : 21
22+ - name : Setup Gradle
23+ uses : gradle/actions/setup-gradle@v5
24+ with :
25+ cache-read-only : ${{ github.ref != 'refs/heads/main' }}
26+ - name : Build
27+ env :
28+ OUT_DIR : " .."
29+ run : ./gradlew :java:assemble --stacktrace
30+ - name : Store built jar
31+ uses : actions/upload-artifact@v7
32+ with :
33+ name : serverlauncher
34+ path : ServerLauncher.jar
35+ retention-days : 1
36+ build_web :
37+ needs : build_serverlauncher
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v6
41+ - name : Download jar artifact
42+ uses : actions/download-artifact@v8
43+ with :
44+ name : serverlauncher
45+ - name : Install Rust
46+ uses : dtolnay/rust-toolchain@stable
47+ with :
48+ toolchain : stable
49+ - uses : Swatinem/rust-cache@v2
50+ with :
51+ key : wasm
52+ - uses : actions/setup-node@v6
53+ with :
54+ node-version : " latest"
55+ package-manager-cache : false
56+ - run : rustup target add wasm32-unknown-unknown
57+ - run : cargo install wasm-bindgen-cli
58+ - run : npm i
59+ - name : Build web target
60+ run : npm run build-release
61+ - uses : actions/upload-pages-artifact@v4
62+ id : deployment
63+ with :
64+ path : dist/
65+ publish_web :
66+ needs : build_web
67+ runs-on : ubuntu-latest
68+ permissions :
69+ pages : write
70+ id-token : write
71+ environment :
72+ name : github-pages
73+ url : ${{ steps.deployment.outputs.page_url }}
74+ steps :
75+ - name : Deploy to GH pages
76+ id : deployment
77+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -254,45 +254,3 @@ jobs:
254254 SNAPSHOTS_PASSWORD : ${{ secrets.NEW_MAVEN_SNAPSHOT_PASSWORD }}
255255 TARGET : ${{ matrix.target }}
256256 OS : ${{ matrix.build }}
257- build_web :
258- needs : build_serverlauncher
259- runs-on : ubuntu-latest
260- steps :
261- - uses : actions/checkout@v6
262- - name : Download jar artifact
263- uses : actions/download-artifact@v8
264- with :
265- name : serverlauncher
266- - name : Install Rust
267- uses : dtolnay/rust-toolchain@stable
268- with :
269- toolchain : stable
270- - uses : Swatinem/rust-cache@v2
271- with :
272- key : wasm
273- - uses : actions/setup-node@v6
274- with :
275- node-version : " latest"
276- package-manager-cache : false
277- - run : rustup target add wasm32-unknown-unknown
278- - run : cargo install wasm-bindgen-cli
279- - run : npm i
280- - name : Build web target
281- run : npm run build-release
282- - uses : actions/upload-pages-artifact@v4
283- id : deployment
284- with :
285- path : dist/
286- publish_web :
287- needs : build_web
288- runs-on : ubuntu-latest
289- permissions :
290- pages : write
291- id-token : write
292- environment :
293- name : github-pages
294- url : ${{ steps.deployment.outputs.page_url }}
295- steps :
296- - name : Deploy to GH pages
297- id : deployment
298- uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments