Skip to content

Merge pull request #2 from davidonet/copilot/fix-failing-actions #5

Merge pull request #2 from davidonet/copilot/fix-failing-actions

Merge pull request #2 from davidonet/copilot/fix-failing-actions #5

Workflow file for this run

name: Build
on:
push:
branches: [main]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
target: aarch64-apple-darwin
artifact: macos-arm64
- platform: macos-latest
target: x86_64-apple-darwin
artifact: macos-x86_64
- platform: ubuntu-22.04
target: ""
artifact: linux
- platform: windows-latest
target: ""
artifact: windows
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install macOS dependencies
if: contains(matrix.platform, 'macos')
run: brew install opus
- name: Set up cmake toolchain for macOS x86_64 cross-compilation
if: matrix.artifact == 'macos-x86_64'
run: |
printf 'set(CMAKE_POLICY_VERSION_MINIMUM 3.5 CACHE STRING "" FORCE)\n' > /tmp/cmake-toolchain.cmake
echo "CMAKE_TOOLCHAIN_FILE=/tmp/cmake-toolchain.cmake" >> $GITHUB_ENV
- name: Install Linux system dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libasound2-dev \
libopus-dev
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
key: ${{ matrix.target }}
- name: Install frontend dependencies
run: npm ci
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.target != '' && format('--target {0}', matrix.target) || '' }}
- name: Upload macOS arm64 bundle
if: matrix.artifact == 'macos-arm64'
uses: actions/upload-artifact@v4
with:
name: macos-arm64
path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
- name: Upload macOS x86_64 bundle
if: matrix.artifact == 'macos-x86_64'
uses: actions/upload-artifact@v4
with:
name: macos-x86_64
path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
- name: Upload Linux bundle
if: matrix.artifact == 'linux'
uses: actions/upload-artifact@v4
with:
name: linux
path: |
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/appimage/*.AppImage
- name: Upload Windows bundle
if: matrix.artifact == 'windows'
uses: actions/upload-artifact@v4
with:
name: windows
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe