-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.07 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
75
76
77
78
79
80
name: Build Linux App
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.19.5
- name: Cache pubspec
id: cache-pubspec
uses: actions/cache@v3
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
pubspec-
- name: Install Rust Toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
rustup default stable
- name: install dependencies
run: |
sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev -y
chmod +x /home/runner/work/all_in_one/all_in_one/rust_builder/cargokit/run_build_tool.sh
- name: Get dependencies
run: flutter pub get
- name: Bump build number
run: |
flutter pub global activate cider
- name: Build Linux app
run: flutter build linux --release -v
- name: Set tag name
run: echo "tag_name=v$(cider version)" >> $GITHUB_ENV
- name: List files in build directory
run: ls -la build/linux/x64/release/bundle/
# - name: Upload build artifacts
# uses: actions/upload-artifact@v2
# with:
# name: linux-app
# path: build/linux/x64/release/bundle/
- name: Archive release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'linux.zip'
directory: build/linux/x64/release/bundle/
- name: Publish release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: build/linux/x64/release/bundle/linux.zip
generateReleaseNotes: true
tag: ${{ env.tag_name }}
token: ${{ secrets.RELEASE_TOKEN }}