-
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (50 loc) · 1.65 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
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: "Unit Bargain Hunter"
author: "Merritt Codes"
identifier: "codes.merritt.bargain"
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
- 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.3.0
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare for build
run: |
flutter config --enable-linux-desktop
flutter upgrade
flutter pub get
# ----------------------------------- Build ---------------------------- #
- 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/*