Skip to content

Commit 6d85733

Browse files
authored
CI updates (#120)
Issue: ============== N/A What was done: ============== * Bumped `trunk` version used in web release builds to 0.19.3. `trunk` is now installed via `cargo`. * Removed obsolete `web_sys_unstable_apis` cfg argument when running web builds. This is no longer necessary since `bevy` `0.13.1`. * Added an environment variable in the repo that is used to set the itch.io username when publishing builds with `butler`. * Removed a few redundant checks and steps in CI workflows.
1 parent fca0f2c commit 6d85733

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

.github/workflows/checks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
prefix-key: ${{ vars.CACHE_BUILD_VERSION }}-cargo-${{ runner.os }}
2121

2222
- name: Install alsa and udev
23-
if: runner.os == 'linux'
2423
run: sudo apt update; sudo apt install --no-install-recommends libasound2-dev libudev-dev
2524

2625
- name: Build and run tests

.github/workflows/publish.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v4
2525

2626
- name: Install MinGW toolchain
27-
if: runner.os == 'linux' && matrix.target == 'x86_64-pc-windows-gnu'
27+
if: matrix.target == 'x86_64-pc-windows-gnu'
2828
run: sudo apt update; sudo apt install -y gcc-mingw-w64-x86-64
2929

3030
- uses: dtolnay/rust-toolchain@stable
@@ -33,34 +33,24 @@ jobs:
3333

3434
- name: Install tools for WASM build
3535
if: matrix.platform == 'web'
36-
run: |
37-
wget -qO- https://github.com/thedodd/trunk/releases/download/v0.18.7/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
36+
run: cargo install trunk --locked --version 0.19.3
3837

3938
- uses: Swatinem/rust-cache@v2
4039
with:
4140
prefix-key: ${{ vars.CACHE_BUILD_VERSION }}-cargo-${{ runner.os }}
4241
key: ${{ matrix.platform }}
4342

4443
- name: Install alsa and udev
45-
if: runner.os == 'linux'
4644
run: sudo apt update; sudo apt install --no-install-recommends libasound2-dev libudev-dev
4745

4846
- name: Build release
4947
if: matrix.platform == 'web'
50-
env:
51-
# WebGPU requires web_sys unstable APIs
52-
RUSTFLAGS: --cfg=web_sys_unstable_apis
53-
run: ./trunk --config Trunk.itch.toml build --release
48+
run: trunk build --release --public-url="./"
5449

5550
- name: Build release
5651
if: matrix.platform != 'web'
5752
run: cargo build --release --target ${{ matrix.target }}
5853

59-
- name: Copy binaries to working directory
60-
if: matrix.platform != 'web'
61-
run: |
62-
cp ./target/${{ matrix.target }}/release/${{ matrix.executable_name }} .
63-
6454
- uses: actions/upload-artifact@v4
6555
if: matrix.platform == 'web'
6656
with:
@@ -71,10 +61,9 @@ jobs:
7161
if: matrix.platform != 'web'
7262
with:
7363
name: ${{ matrix.platform }}
64+
# We don't need to publish the `assets` folder alongside the binary as we are using bevy_embedded_assets
7465
path: |
75-
./assets/
76-
./${{ vars.KEBAB_CASE_GAME_NAME }}.exe
77-
./${{ vars.KEBAB_CASE_GAME_NAME }}
66+
./target/${{ matrix.target }}/release/${{ matrix.executable_name }}
7867
7968
publish:
8069
runs-on: ubuntu-latest
@@ -103,4 +92,4 @@ jobs:
10392
env:
10493
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
10594
run: |
106-
./butler push ./release/ mnmaita/${{ vars.KEBAB_CASE_GAME_NAME }}:${{ matrix.platform }} --userversion ${{ github.event.release.tag_name }}
95+
./butler push ./release/ ${{ vars.ITCH_IO_USERNAME }}/${{ vars.KEBAB_CASE_GAME_NAME }}:${{ matrix.platform }} --userversion ${{ github.event.release.tag_name }}

Trunk.itch.toml

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

0 commit comments

Comments
 (0)