-
Notifications
You must be signed in to change notification settings - Fork 25
66 lines (54 loc) · 2.47 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
name: Build and Package Linux app
on:
release:
types:
- created
jobs:
build-linux:
if: contains(github.event.release.tag_name, 'linux') || (!contains(github.event.release.tag_name, 'linux') && !contains(github.event.release.tag_name, 'windows') && !contains(github.event.release.tag_name, 'chrome'))
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.22.3"
- run: flutter --version
- name: Setup Dependencies
run: |
sudo apt-get update
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libsecret-1-dev libjsoncpp-dev fuse libgtk-3-0 python3-pip libgtkmm-3.0-1v5 libnotify4 gstreamer1.0-tools
- name: Build Flutter Application
run: flutter build linux --release
- name: Get Version from pubspec.yaml
id: get_version
run: |
version_str=$(grep -oP '(?<=^version: ).*' pubspec.yaml | awk '{$1=$1};1')
echo "version_app=${version_str}" >> $GITHUB_OUTPUT
echo "env_version_app=${version_str}" >> $GITHUB_ENV
- name: Install appimage-builder
run: |
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
chmod +x /usr/local/bin/appimagetool
sudo pip3 install appimage-builder
- name: Generate AppImage
run: |
appimage-builder --recipe AppImageBuilder.yml --skip-test
mv archethic_wallet-${{ steps.get_version.outputs.version_app }}-x86_64.AppImage archethic-wallet-linux-${{ steps.get_version.outputs.version_app }}-x86_64.AppImage
- name: Check files
run: |
ls -R
- name: Checksum
run: |
sha256sum archethic-wallet-linux-${{ steps.get_version.outputs.version_app }}-x86_64.AppImage
- name: Upload artifact to action
uses: actions/upload-artifact@v4
with:
name: archethic-wallet-linux-${{ steps.get_version.outputs.version_app }}-appimage
path: archethic-wallet-linux-${{ steps.get_version.outputs.version_app }}-x86_64.AppImage
- name: Upload artifact to release
uses: softprops/action-gh-release@v2
with:
files: archethic-wallet-linux-${{ steps.get_version.outputs.version_app }}-x86_64.AppImage