File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Release
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - test
7
+
8
+ jobs :
9
+ create-release :
10
+ name : Create Release
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : release
15
+ uses : actions/create-release@v1
16
+ id : create_release
17
+ with :
18
+ release_name : ${{ github.event.title }} # pull request title
19
+ tag_name : ${{ github.ref }}
20
+ env :
21
+ GITHUB_TOKEN : ${{ github.token }}
22
+
23
+ build-android :
24
+ name : Build android
25
+ runs-on : ubuntu-latest
26
+
27
+ steps :
28
+ - uses : actions/checkout@v2
29
+ - uses : subosito/flutter-action@v1.5.3
30
+ - uses : actions/setup-java@v2
31
+ with :
32
+ distribution : ' zulu'
33
+ java-version : ' 11'
34
+
35
+ - name : Install dependencies
36
+ run : flutter pub get
37
+
38
+ - name : Build apk
39
+ run : flutter build apk
40
+
41
+ - name : Upload apk to release
42
+ uses : actions/upload-release-asset@v1
43
+ env :
44
+ GITHUB_TOKEN : ${{ github.token }}
45
+ with :
46
+ upload_url : ${{ github.jobs.create-release.steps.create_release.outputs.upload_url }}
47
+ asset_path : ${{ env.GITHUB_WORKSPACE }}/build/app/outputs/flutter-apk/app-release.apk
48
+ asset_name : corecoder_develop_${{ github.ref }}.apk
49
+ asset_content_type : application/gzip
50
+ build-windows :
51
+ name : Build windows
52
+ runs-on : windows-latest
53
+ steps :
54
+ - uses : actions/checkout@v2
55
+ - uses : subosito/flutter-action@v1
56
+ with :
57
+ channel : beta
58
+ - name : Install dependencies
59
+ run : flutter pub get
60
+ - name : Enable windows
61
+ run : flutter config --enable-windows-desktop
62
+ - name : Build windows
63
+ run : flutter build windows
64
+ # TODO: upload windows i dont know windows file path help
You can’t perform that action at this time.
0 commit comments