Skip to content

Commit 8ac72a4

Browse files
committed
Modernize CI Workflow
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 8ac72a4

3 files changed

Lines changed: 33 additions & 28 deletions

File tree

.github/dependabot.yml

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

.github/workflows/ci.yml

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ 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

@@ -74,19 +74,16 @@ jobs:
7474
components: rust-src
7575
targets: wasm32-unknown-unknown
7676

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 }}
85-
8677
- name: Install binaryen
8778
if: github.repository == 'LiveSplit/LiveSplitOne' && github.ref == 'refs/heads/master'
8879
shell: bash
80+
env:
81+
GH_TOKEN: ${{ github.token }}
8982
run: |
83+
gh release download \
84+
--repo WebAssembly/binaryen \
85+
--pattern "binaryen-*-${{ matrix.binaryen }}.tar.gz" \
86+
--dir "${{ matrix.cargo_bin }}"
9087
cd ${{ matrix.cargo_bin }}/..
9188
tar -xzf bin/binaryen-*-${{ matrix.binaryen }}.tar.gz
9289
mkdir -p lib
@@ -98,17 +95,15 @@ jobs:
9895
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
9996
id: wasm-bindgen
10097

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-
10998
- name: Install wasm-bindgen-cli
11099
shell: bash
100+
env:
101+
GH_TOKEN: ${{ github.token }}
111102
run: |
103+
gh release download "${{ steps.wasm-bindgen.outputs.version }}" \
104+
--repo rustwasm/wasm-bindgen \
105+
--pattern "wasm-bindgen-${{ steps.wasm-bindgen.outputs.version }}-${{ matrix.target }}.tar.gz" \
106+
--dir "${{ matrix.cargo_bin }}"
112107
cd ${{ matrix.cargo_bin }}
113108
tar -xzf wasm-bindgen-${{ steps.wasm-bindgen.outputs.version }}-${{ matrix.target }}.tar.gz
114109
mv wasm-bindgen-${{ steps.wasm-bindgen.outputs.version }}-${{ matrix.target }}/wasm* .
@@ -133,9 +128,17 @@ jobs:
133128
librsvg2-dev
134129
135130
- name: Build Core
131+
shell: bash
136132
env:
137133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138-
run: npm run build:core:deploy
134+
run: |
135+
# Pull requests only need a smoke test of the desktop path, so use
136+
# the cheaper debug core build for Tauri jobs outside master.
137+
if [[ "${{ matrix.platform }}" == "tauri" && "${{ github.ref }}" != "refs/heads/master" ]]; then
138+
npm run build:core
139+
else
140+
npm run build:core:deploy
141+
fi
139142
140143
- name: Run eslint (Web)
141144
if: matrix.platform == 'web'
@@ -179,7 +182,15 @@ jobs:
179182
180183
- name: Build (Tauri)
181184
if: matrix.platform == 'tauri'
182-
run: npm run tauri:publish
185+
shell: bash
186+
run: |
187+
# Master still produces release bundles. Other refs only need a
188+
# debug compile, which skips bundling and returns much faster.
189+
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
190+
npm run tauri:publish -- --ci
191+
else
192+
npm run tauri:build:debug -- --ci
193+
fi
183194
184195
- name: Add CNAME file (Web)
185196
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)