fix #36
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 | |
on: | |
push: | |
workflow_call: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# MacOS (Intel & Apple Silicon) | |
- platform: macos-latest | |
rust_targets: x86_64-apple-darwin,aarch64-apple-darwin | |
tauri_target: universal-apple-darwin | |
# 64-bit Linux | |
- platform: ubuntu-22.04 | |
rust_targets: x86_64-unknown-linux-gnu | |
tauri_target: x86_64-unknown-linux-gnu | |
# 64-bit Windows | |
- platform: windows-latest | |
rust_targets: x86_64-pc-windows-msvc | |
tauri_target: x86_64-pc-windows-msvc | |
# 32-bit Windows | |
- platform: windows-latest | |
rust_targets: i686-pc-windows-msvc | |
tauri_target: i686-pc-windows-msvc | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 | |
with: | |
toolchain: nightly | |
targets: ${{ matrix.rust_targets }} | |
- uses: swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894 | |
with: | |
workspaces: packages/desktop | |
key: ${{ matrix.rust_targets }}-${{ hashFiles('packages/desktop/Cargo.lock') }} | |
- name: Install dependencies (Ubuntu) | |
if: matrix.platform == '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 | |
- run: pnpm i | |
- run: pnpm build --filter zebar --filter @zebar/client | |
- uses: tauri-apps/tauri-action@v0 | |
id: tauri | |
with: | |
projectPath: packages/desktop | |
args: --target ${{ matrix.tauri_target }} | |
- run: | | |
mkdir tmp | |
for f in ${{ join(fromJSON(steps.tauri.outputs.artifactPaths), ' ') }}; do | |
mv "$f" "tmp/tauri.${f##*.}" | |
done | |
shell: bash | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bundle-${{ matrix.target }} | |
if-no-files-found: error | |
path: tmp |