-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (90 loc) · 3.34 KB
/
main.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
name: "Build & Release"
on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
- develop
jobs:
build-and-release-linux:
name: Build & Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '17.0.7'
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.1'
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- run: flutter build apk --debug --split-per-abi
- uses: ncipollo/release-action@v1
with:
artifacts: "build/app/output/apk/debug/*"
tag: v1.0.${{github.run_number}}
token: ${{ secrets.TOKEN }}
build-and-release-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.1'
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Enable windows build
run: flutter config --enable-windows-desktop
- name: Build artifacts
run: flutter build windows --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: ${{github.ref_name}}-windows.zip
directory: build/windows/runner/
- name: Windows Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/windows/runner/Release/${{github.ref_name}}-windows.zip
build-and-release-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.1'
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Enable macOS build
run: flutter config --enable-macos-desktop
- name: Build artifacts
run: flutter build macos --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: MacRecoveryX-${{github.ref_name}}-macos.zip
directory: build/macos/Build/Products/Release
- name: macOS Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/macos/Build/Products/Release/MacRecoveryX-${{github.ref_name}}-macos.zip