-
-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (61 loc) · 2.33 KB
/
build-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build Linux
on:
# Enable manual run
workflow_dispatch:
# Allow being called by other workflows
workflow_call:
inputs:
pre-release:
description: "Whether the build is for a pre-release"
required: false
default: false
type: boolean
env:
app-display-name: "Adventure List"
author: "Merritt Codes"
identifier: "codes.merritt.adventurelist"
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-20.04
# ----------------------------------- Setup ------------------------------ #
steps:
- name: Setup Linux build requirements
run: |
sudo apt-get update
# libappindicator required for tray_manager
sudo apt-get install appindicator3-0.1 libappindicator3-dev
# libnotify-dev required for notifications, only until the
# following issue is resolved:
# https://github.com/MaikuB/flutter_local_notifications/issues/746
sudo apt-get install libnotify-dev
# keybinder required for global hotkeys
sudo apt-get install keybinder-3.0
- name: Set pre-release environment variable
if: inputs.pre-release == true
run: echo "prerelease=true" >> $GITHUB_ENV
- name: Setup Flutter
uses: subosito/flutter-action@v2.10.0
# Specify the Flutter version to work around bug in new version:
# https://github.com/flutter/flutter/issues/144873
with:
flutter-version: '3.19.6'
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare for build
run: |
flutter config --enable-linux-desktop
flutter pub get
# ----------------------------------- Build ---------------------------- #
- name: Generate localizations
run: dart run easy_localization:generate --source-dir translations --output-dir lib/generated --output-file locale_keys.g.dart --format keys --skip-unnecessary-keys
- name: Run build script
env:
GITHUB_TOKEN: ${{ secrets.RELEASES_TOKEN }}
run: flutter pub run flutter_app_builder -v --platforms=linux
# ---------------------------------- Upload ---------------------------- #
- name: Upload artifacts to workflow
uses: actions/upload-artifact@v3
with:
name: linux-artifacts
path: output/*