Skip to content

Commit

Permalink
Fixed windows & linux desktop build action
Browse files Browse the repository at this point in the history
  • Loading branch information
albbus-stack committed May 24, 2024
1 parent 020e25e commit 7732e62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Install development dependencies
run: sudo apt-get install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev
run: sudo apt-get install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev libxdo-dev

- name: Install Bun
uses: oven-sh/setup-bun@v1
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@ jobs:
run: cargo install dioxus-cli

- name: Create .cargo/config.toml file
run: mkdir .cargo && printf "[profile.release]\nopt-level = \"z\"\ndebug = false\nlto = true\ncodegen-units = 1\npanic = \"abort\"\nstrip = true\nincremental = false\n" > .cargo/config.toml
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:
Expand All @@ -50,7 +59,12 @@ jobs:
SUPABASE_API_KEY: ${{ secrets.SUPABASE_API_KEY }}
SUPABASE_JWT_SECRET: ${{ secrets.SUPABASE_JWT_SECRET }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: printf "API_URL=$API_URL\nSUPABASE_URL=$SUPABASE_URL\nSUPABASE_API_KEY=$SUPABASE_API_KEY\nSUPABASE_JWT_SECRET=$SUPABASE_JWT_SECRET\nDATABASE_URL=$DATABASE_URL\n" > .env
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
Expand Down

0 comments on commit 7732e62

Please sign in to comment.