@@ -55,38 +55,37 @@ jobs:
5555
5656 steps :
5757 - name : Checkout commit
58- uses : actions/checkout@v4
58+ uses : actions/checkout@v6
5959 with :
6060 submodules : recursive
6161 # This forces the entire history to be cloned, which is necessary for
6262 # the changelog generation to work correctly.
6363 fetch-depth : 0
6464
6565 - name : Install Node
66- uses : actions/setup-node@v4
66+ uses : actions/setup-node@v6
6767 with :
6868 node-version : " lts/*"
6969
7070 - name : Install Rust
71- uses : hecrj/setup-rust-action@v2
72- with :
73- rust-version : nightly
74- components : rust-src
75- targets : wasm32-unknown-unknown
76-
77- - name : Download binaryen
78- if : github.repository == 'LiveSplit/LiveSplitOne' && github.ref == 'refs/heads/master'
79- uses : robinraju/release-downloader@v1.10
80- with :
81- repository : " WebAssembly/binaryen"
82- latest : true
83- fileName : " binaryen-*-${{ matrix.binaryen }}.tar.gz"
84- out-file-path : ${{ matrix.cargo_bin }}
71+ shell : bash
72+ run : |
73+ rustup set profile minimal
74+ rustup toolchain install nightly \
75+ --component rust-src \
76+ --target wasm32-unknown-unknown
77+ rustup default nightly
8578
8679 - name : Install binaryen
8780 if : github.repository == 'LiveSplit/LiveSplitOne' && github.ref == 'refs/heads/master'
8881 shell : bash
82+ env :
83+ GH_TOKEN : ${{ github.token }}
8984 run : |
85+ gh release download \
86+ --repo WebAssembly/binaryen \
87+ --pattern "binaryen-*-${{ matrix.binaryen }}.tar.gz" \
88+ --dir "${{ matrix.cargo_bin }}"
9089 cd ${{ matrix.cargo_bin }}/..
9190 tar -xzf bin/binaryen-*-${{ matrix.binaryen }}.tar.gz
9291 mkdir -p lib
@@ -98,17 +97,15 @@ jobs:
9897 run : echo "version=$(cd livesplit-core && cargo tree -i wasm-bindgen --features wasm-web --target wasm32-unknown-unknown --depth 0 | sed 's/.* v//g')" >> $GITHUB_OUTPUT
9998 id : wasm-bindgen
10099
101- - name : Download wasm-bindgen-cli
102- uses : robinraju/release-downloader@v1.9
103- with :
104- repository : " rustwasm/wasm-bindgen"
105- tag : ${{ steps.wasm-bindgen.outputs.version }}
106- fileName : " wasm-bindgen-${{ steps.wasm-bindgen.outputs.version }}-${{ matrix.target }}.tar.gz"
107- out-file-path : ${{ matrix.cargo_bin }}
108-
109100 - name : Install wasm-bindgen-cli
110101 shell : bash
102+ env :
103+ GH_TOKEN : ${{ github.token }}
111104 run : |
105+ gh release download "${{ steps.wasm-bindgen.outputs.version }}" \
106+ --repo rustwasm/wasm-bindgen \
107+ --pattern "wasm-bindgen-${{ steps.wasm-bindgen.outputs.version }}-${{ matrix.target }}.tar.gz" \
108+ --dir "${{ matrix.cargo_bin }}"
112109 cd ${{ matrix.cargo_bin }}
113110 tar -xzf wasm-bindgen-${{ steps.wasm-bindgen.outputs.version }}-${{ matrix.target }}.tar.gz
114111 mv wasm-bindgen-${{ steps.wasm-bindgen.outputs.version }}-${{ matrix.target }}/wasm* .
@@ -133,9 +130,17 @@ jobs:
133130 librsvg2-dev
134131
135132 - name : Build Core
133+ shell : bash
136134 env :
137135 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
138- run : npm run build:core:deploy
136+ run : |
137+ # Pull requests only need a smoke test of the desktop path, so use
138+ # the cheaper debug core build for Tauri jobs outside master.
139+ if [[ "${{ matrix.platform }}" == "tauri" && "${{ github.ref }}" != "refs/heads/master" ]]; then
140+ npm run build:core
141+ else
142+ npm run build:core:deploy
143+ fi
139144
140145 - name : Run eslint (Web)
141146 if : matrix.platform == 'web'
@@ -179,7 +184,15 @@ jobs:
179184
180185 - name : Build (Tauri)
181186 if : matrix.platform == 'tauri'
182- run : npm run tauri:publish
187+ shell : bash
188+ run : |
189+ # Master still produces release bundles. Other refs only need a
190+ # debug compile, which skips bundling and returns much faster.
191+ if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
192+ npm run tauri:publish -- --ci
193+ else
194+ npm run tauri:build:debug -- --ci
195+ fi
183196
184197 - name : Add CNAME file (Web)
185198 if : matrix.platform == 'web' && github.repository == 'LiveSplit/LiveSplitOne' && github.ref == 'refs/heads/master'
0 commit comments