diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 956caf2..0c8cba8 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -1,16 +1,47 @@ -name: Build Bevy Game (Linux) +name: Build Bevy Game (Linux + Windows) on: push: workflow_dispatch: jobs: - build: + + build-windows: runs-on: docker container: - image: git.rufous-trench.ts.net/crizomb/forgejo-action-rust-bevy:deb13-node20-2 + image: git.rufous-trench.ts.net/crizomb/forgejo-action-rust-bevy:latest steps: - uses: actions/checkout@v4 + + - name: Install Windows target + run: | + rustup target add x86_64-pc-windows-gnu + + - name: Build Bevy game (Windows release) + run: | + export CARGO_BUILD_JOBS=2 + export RUSTFLAGS="-Ccodegen-units=4 -Cdebuginfo=0" + cargo build --release --target x86_64-pc-windows-gnu + + - name: Prepare distribution bundle + run: | + mkdir -p dist/bevy-santa + cp target/x86_64-pc-windows-gnu/release/bevy-santa.exe dist/bevy-santa/ + cp -r assets dist/bevy-santa/ + + - name: Upload game bundle + uses: actions/upload-artifact@v3 + with: + name: bevy-santa-windows-release + path: dist/bevy-santa + + build-linux: + runs-on: docker + container: + image: git.rufous-trench.ts.net/crizomb/forgejo-action-rust-bevy:latest + steps: + - uses: actions/checkout@v4 + - name: Build Bevy game (release) run: | export CARGO_BUILD_JOBS=2 @@ -28,3 +59,4 @@ jobs: with: name: bevy-santa-linux-release path: dist/bevy-santa +