Skip to content

Build

Build #8

Workflow file for this run

name: Build
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install platform dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
sudo apt-get install -y libappindicator3-dev
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install project dependencies
run: flutter pub get
- name: Build for ${{ matrix.os }}
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
flutter build linux
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
flutter build macos
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
flutter build windows
fi
shell: bash
- name: Pack releases
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
pushd build/linux/x64/release/bundle
zip -r ../../../../keyviz-release-linux.zip .
popd
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
cd build/macos
zip -r ../keyviz-release-macos.zip .
cd ..
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
cd build/windows
zip -r ../keyviz-release-windows.zip .
cd ..
fi
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-build
path: build/keyviz-release-*