-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.48 KB
/
Copy pathexample-linux.yml
File metadata and controls
59 lines (48 loc) · 1.48 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build Example Linux
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
env:
BUILD_MODE: release
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Compute artifact version
run: echo "ARTIFACT_VERSION=$(./tools/artifact_version.sh)" >> "$GITHUB_ENV"
- name: Install example dependencies
working-directory: example
run: flutter pub get
- name: Build Linux example bundle
working-directory: example
run: flutter build linux --release
- name: Package Linux artifact
run: ./tools/package_linux_example.sh "$ARTIFACT_VERSION"
- name: Upload Linux artifact
uses: richnetdesign/git-artifact-upload@v2
with:
name: linux-x64
version: ${{ env.ARTIFACT_VERSION }}
filename: usb_mtp_client_example-linux-x64-${{ env.ARTIFACT_VERSION }}.tar.gz
path: dist/usb_mtp_client_example-linux-x64-${{ env.ARTIFACT_VERSION }}.tar.gz
if-no-files-found: error
retention-days: 7