Skip to content

Commit 2a8fb4f

Browse files
authored
Modernize CI Workflow (#1132)
This updates the CI workflow to use Node 24-capable action versions, replaces `robinraju/release-downloader` with `gh release download`, and makes non-master Tauri jobs use a debug core build and a non-bundled debug app build. Pull requests only need a smoke test of the desktop path, so this keeps master on the full release path while cutting PR build latency substantially. This also removes the `.github/dependabot.yml` config, as its too spammy and a modern agent workflow is just so much better at keeping dependencies up to date.
1 parent 4a97fda commit 2a8fb4f

3 files changed

Lines changed: 40 additions & 33 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -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'

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"serve": "vite",
1212
"tauri:icons": "tauri icon src/assets/icon.png",
1313
"tauri:build-html": "vite build --mode tauri",
14+
"tauri:build:debug": "tauri build --debug --no-bundle",
1415
"tauri:watch": "tauri dev",
1516
"tauri:publish": "tauri build"
1617
},

0 commit comments

Comments
 (0)