-
Notifications
You must be signed in to change notification settings - Fork 0
174 lines (141 loc) · 5.2 KB
/
build_release.yaml
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Build Release
on:
push:
branches:
- main
paths:
- "lib/**"
- "video_player/lib/**"
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup the Java environment
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: "17"
- name: Setup the flutter environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Create signing key
uses: timheuer/[email protected]
with:
fileDir: "android/"
fileName: "keystore.jks"
encodedString: ${{ secrets.ANDROID_KEY_BASE64 }}
- name: Create key.properties
run: |
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" > android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
echo "storeFile=/home/runner/work/album_share/android/keystore.jks" >> android/key.properties
- name: Build appbundle
run: |
flutter pub get
flutter build appbundle
- name: Rename bundle
run: mv build/app/outputs/bundle/release/app-release.aab build/app/outputs/bundle/release/AlbumShare-{{github.ref_name}}-android.aab
- name: Create symbols archive
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: AlbumShare-{{github.ref_name}}-android-symbols.zip
directory: build/app/intermediates/merged_natove_libs/release/out/lib/
- name: Add files to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
build/app/intermediates/merged_natove_libs/release/out/lib/AlbumShare-{{github.ref_name}}-android-symbols.zip
build/app/outputs/bundle/release/AlbumShare-{{github.ref_name}}-android.aab
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install flutter dependencies
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5 libmpv-dev mpv
- name: Setup the flutter environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install project dependencies
run: flutter pub get
- name: Generate build files
run: dart run build_runner build --delete-conflicting-outputs
- name: Build
run: flutter build linux --release
- name: Creative archive
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: AlbumShare-{{github.ref_name}}-linux.zip
directory: build/linux/x64/release/bundle
- name: Add archive to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/linux/x64/release/bundle/AlbumShare-{{github.ref_name}}-linux.zip
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup the flutter environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install project dependencies
run: flutter pub get
- name: Generate build files
run: dart run build_runner build --delete-conflicting-outputs
- name: Build
run: flutter build windows --release
- name: Creative archive
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: AlbumShare-{{github.ref_name}}-windows.zip
directory: build/windows/x64/runner/Release
- name: Add archive to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/windows/x64/runner/Release/AlbumShare-{{github.ref_name}}-windows.zip
build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup the flutter environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install project dependencies
run: flutter pub get
- name: Generate build files
run: dart run build_runner build --delete-conflicting-outputs
- name: Build
run: flutter build macos --release
- name: Creative archive
uses: thedoctor0/[email protected]
with:
type: "zip"
filename: AlbumShare-{{github.ref_name}}-macos.zip
directory: build/macos/Build/Products/Release
- name: Add archive to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/macos/Build/Products/Release/AlbumShare-{{github.ref_name}}-macos.zip
# build_ios:
# runs-on: macos-latest
# steps: