forked from fleetingnotes/fleeting-notes-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.47 KB
/
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
name: linux
on:
workflow_dispatch:
# pull_request:
# branches: [ main ]
# paths:
# - 'linux/**'
# - '.github/workflows/linux.yml'
# - 'pubspec.yaml'
# push:
# # for release
# tags:
# - "v*.*.*"
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Adds env.json
env:
ENV_JSON: ${{ secrets.ENV_JSON }}
run: echo $ENV_JSON > env.json
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.4'
cache: true
channel: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install -y libsecret-1-dev libjsoncpp-dev libsecret-1-0
- run: flutter doctor -v
- run: flutter pub get
- run: flutter build linux --release -v --dart-define-from-file=env.json
- run: zip -r build/fn-linux.zip build/linux/x64/release/bundle
- name: Build AppImage using appimage-builder
uses: docker://appimagecrafters/appimage-builder:1.1.0
with:
entrypoint: appimage-builder
args: --recipe ./linux/AppImageBuilder.yml --skip-test
- run: mv ./*.AppImage* build
- run: tree -F build
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/fn-*.zip
build/*.AppImage
draft: true
fail_on_unmatched_files: true