File tree Expand file tree Collapse file tree 2 files changed +59
-4
lines changed Expand file tree Collapse file tree 2 files changed +59
-4
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: Builds
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
5
+ branches : [ master ]
6
6
pull_request :
7
- branches : [ main ]
7
+ branches : [ master ]
8
8
9
9
permissions : read-all
10
10
@@ -23,14 +23,14 @@ jobs:
23
23
java-version : 11
24
24
distribution : temurin
25
25
26
- - name : Clone Flutter repository with master channel
26
+ - name : Set up Flutter
27
27
uses : subosito/flutter-action@v2
28
28
with :
29
29
flutter-version : ' 3.16.9'
30
30
channel : ' stable'
31
31
- run : flutter doctor -v
32
32
33
- - name : Checkout gallery code
33
+ - name : Checkout Code
34
34
uses : actions/checkout@v4
35
35
- run : flutter pub get
36
36
Original file line number Diff line number Diff line change
1
+ name : Test, Build and Release APK
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ build :
13
+ name : Build APK
14
+ runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : read
17
+ packages : write
18
+
19
+ steps :
20
+ - name : Checkout Repository
21
+ uses : actions/checkout@v4
22
+
23
+ - name : Set up Java
24
+ uses : actions/setup-java@v4
25
+ with :
26
+ distribution : ' temurin'
27
+ java-version : ' 17.x'
28
+
29
+ - name : Set up Flutter
30
+ uses : subosito/flutter-action@v2
31
+ with :
32
+ flutter-version : ' 3.16.9'
33
+ channel : ' stable'
34
+
35
+ - name : Cache Gradle dependencies
36
+ uses : actions/cache@v4
37
+ with :
38
+ path : ~/.gradle/caches
39
+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
40
+ restore-keys : |
41
+ ${{ runner.os }}-gradle-
42
+
43
+ - name : Get dependencies
44
+ run : flutter pub get
45
+
46
+ - name : Build APK
47
+ run : flutter build apk --release
48
+
49
+ - name : Create a Release APK
50
+ uses : ncipollo/release-action@v1
51
+ with :
52
+ artifacts : " build/app/outputs/flutter-apk/*.apk"
53
+ token : ${{ secrets.PERSONAL_TOKEN }}
54
+ commit : main
55
+ tag : v1.0.${{ github.run_number }}
You can’t perform that action at this time.
0 commit comments