chore: run cargo fmt
#102
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_app: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-22.04, macos-12] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- run: rustup toolchain install stable --profile minimal | |
- 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 --verison; | |
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.2.0_amd64.deb | |
src-tauri/target/release/bundle/appimage/citadel_0.2.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.2.0_x64.dmg |