test #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Game | |
on: | |
push: | |
branches: | |
- test | |
jobs: | |
build-tauri: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
[ | |
{ os: 'macos-latest', target: 'aarch64-apple-darwin' }, | |
] | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies (ubuntu only) | |
if: matrix.platform.os == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libglib2.0-dev alsa-base alsa-utils libasound2-dev pkg-config | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.platform.target }} | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './apps/game/src-tauri -> target' | |
key: ${{ matrix.platform.target }}-${{ matrix.platform.os }}-game | |
- name: Install dependencies | |
run: bun install | |
- name: Build the Tauri app | |
id: tauri-build | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
VITE_API_URL: ${{ vars.VITE_API_URL }} | |
VITE_APP_URL: ${{ vars.VITE_APP_URL }} | |
with: | |
projectPath: apps/game | |
tauriScript: bun run tauri | |
args: --target ${{ matrix.platform.target }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tuneperfect-${{ matrix.platform.os }}-${{ matrix.platform.target }} | |
path: "${{ join(fromJSON(steps.tauri-build.outputs.artifactPaths), '\n') }}" | |
if-no-files-found: error | |
create-release: | |
needs: build-tauri | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: List downloaded artifacts | |
run: find artifacts -type f | sort | |