Skip to content

Add Windows builds #106

Add Windows builds

Add Windows builds #106

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_app:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to
# slightly speed up Windows and Linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- uses: Swatinem/rust-cache@v2
with:
# using the default — we can bust the cache by changing this
prefix-key: "v0-rust"
workspaces: "src-tauri"
- name: (Ubuntu only) Install dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install node packages
run: bun install
- name: List installed versions
run: |
bun --version;
cargo --version;
bun tauri --version
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tauriScript: bun tauri
- name: (Ubuntu only) Upload build artifacts
if: matrix.platform == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: linux-deb-and-appimage
path: |
src-tauri/target/release/bundle/deb/citadel_0.3.0_amd64.deb
src-tauri/target/release/bundle/appimage/citadel_0.3.0_amd64.AppImage
- name: (macOS only) Upload build artifacts
if: matrix.platform == 'macos-12'
uses: actions/upload-artifact@v4
with:
name: macos-app-and-dmg
path: |
src-tauri/target/release/bundle/macos/Citadel.app
src-tauri/target/release/bundle/dmg/Citadel_0.3.0_x64.dmg
- name: (Windows only) Upload build artifacts
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: windows-msi
path: |
src-tauri/target/release/bundle/msi/citadel_0.3.0_x64_en-US.msi