Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinZiabek authored Oct 14, 2024
1 parent ae14716 commit d552640
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: QuestPDF Companion Build

on:
workflow_dispatch:


jobs:
main:
name: ${{ matrix.runtime.name }}
runs-on: ${{ matrix.runtime.runs-on }}
container: ${{ matrix.runtime.container }}

strategy:
fail-fast: false
matrix:
runtime:
- name: windows
runs-on: windows-latest
- name: linux
runs-on: ubuntu-latest
container: ubuntu:20.04
# - name: macos (run locally)
# runs-on: macos-latest-xlarge

steps:
- uses: actions/checkout@v3

- name: Set timezone configuration to non-interactive
if: matrix.runtime.name == 'linux'
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
env:
TZ: "America/New_York"

- name: Install linux dependencies
if: matrix.runtime.name == 'linux'
run: apt-get update && apt-get install -y jq curl xz-utils git ninja-build libgtk-3-dev cmake clang

- name: Install appdmg
if: matrix.runtime.name == 'macos'
run: npm install -g appdmg

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
channel: 'stable'

- name: Fix Flutter on Linux
if: matrix.runtime.name == 'linux'
run: git config --global --add safe.directory '*'

- name: Get Dependencies
run: flutter pub get

- name: Activate Packaging Tool
run: dart pub global activate flutter_distributor

- name: Make windows/exe
if: matrix.runtime.name == 'windows'
run: flutter_distributor package --platform=windows --targets=exe

- name: Make linux/deb
if: matrix.runtime.name == 'linux'
run: flutter_distributor package --platform=linux --targets=deb

- name: Make macos-arm64/dmg
if: matrix.runtime.name == 'macos'
run: flutter_distributor package --platform=macos --targets=dmg

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: questpdf-companion-build
path: dist

0 comments on commit d552640

Please sign in to comment.