Skip to content

Build Windows App (.msi) #2

Build Windows App (.msi)

Build Windows App (.msi) #2

Workflow file for this run

name: Build Desktop App (Windows)
on:
# push:
# branches:
# - master
# pull_request:
# branches:
# - master
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Bun dependencies
run: bun install --frozen-lockfile
- name: Generate TailwindCSS
run: bun build:tailwind
- name: Install Dioxus CLI
run: cargo install dioxus-cli
- name: Create .cargo/config.toml file
run: |
mkdir .cargo
echo [profile.release] >> .cargo/config.toml
echo opt-level = "z" >> .cargo/config.toml
echo debug = false >> .cargo/config.toml
echo lto = true >> .cargo/config.toml
echo codegen-units = 1 >> .cargo/config.toml
echo panic = "abort" >> .cargo/config.toml
echo strip = true >> .cargo/config.toml
echo incremental = false >> .cargo/config.toml
- name: Create .env file
env:
API_URL: ${{ secrets.API_URL }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_API_KEY: ${{ secrets.SUPABASE_API_KEY }}
SUPABASE_JWT_SECRET: ${{ secrets.SUPABASE_JWT_SECRET }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
echo API_URL=%API_URL% >> .env
echo SUPABASE_URL=%SUPABASE_URL% >> .env
echo SUPABASE_API_KEY=%SUPABASE_API_KEY% >> .env
echo SUPABASE_JWT_SECRET=%SUPABASE_JWT_SECRET% >> .env
echo DATABASE_URL=%DATABASE_URL% >> .env
- name: Build
run: mv Cargo.toml Cargo.toml.bak && cp Cargo.desktop.toml Cargo.toml && dx bundle --platform desktop --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: windows
path: dist/bundle/msi/