-
-
Notifications
You must be signed in to change notification settings - Fork 2
126 lines (98 loc) · 2.9 KB
/
ci.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# https://github.com/localsend/localsend/blob/135939850291f6d15c984307cc9186f2ac5c9b36/.github/workflows/release.yml
# https://github.com/kra-mo/cartridges/blob/2801e777f785428614dab48cb6aa79068dc8ee67/.github/workflows/ci.yml
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: release-${{ github.sha }}
jobs:
android:
name: Android
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build for Android
run: flutter build apk --split-per-abi --release
- name: Zip compiled files
run: |
cd build/app/outputs/flutter-apk/
zip -yr Sly.zip *.apk
- name: Upload zip
uses: actions/upload-artifact@v4
with:
name: Android APK
path: build/app/outputs/flutter-apk/Sly.zip
linux:
name: Linux
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build for Linux
run: flutter build linux --release
- name: Create tar.gz archive
run: |
cd build/linux/x64/release/bundle
tar -czvf ../../../../../Sly.tar.gz *
- name: Upload tar.gz archive
uses: actions/upload-artifact@v4
with:
name: Linux Binary
path: ./*.tar.gz
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build for macOS
run: flutter build macos --release
- name: Zip compiled files
run: |
cd build/macos/Build/Products/Release
zip -yr Sly.zip Sly.app
- name: Upload zip
uses: actions/upload-artifact@v4
with:
name: macOS Application
path: build/macos/Build/Products/Release/Sly.zip
windows:
name: Windows
runs-on: windows-latest
steps:
- name: Fix long file paths
run: git config --system core.longpaths true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build for Windows
run: dart run msix:create
- name: Upload MSIX
uses: actions/upload-artifact@v4
with:
name: Windows Installer
path: build\windows\x64\runner\Release\sly.msix