-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (36 loc) · 1.47 KB
/
build_linux.yml
File metadata and controls
40 lines (36 loc) · 1.47 KB
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
name: Build linux
on:
workflow_dispatch:
jobs:
build:
env:
PUB_CACHE: ${{ github.workspace }}/.pub-cache
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
# optional parameters follow
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
- run: flutter --version
- run: sudo apt update && sudo apt install ninja-build libgtk-3-dev
- run: flutter build linux
- name: Compress binary
run: |
cd build/linux/x64/release/bundle
tar -czvf shock_alarm_linux_x64.tar.gz *
cd ../../../../../
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ShockAlarm-Linux-x64
path: build/linux/x64/release/bundle/shock_alarm_linux_x64.tar.gz