-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (51 loc) · 1.47 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
on:
# pull_request:
# branches:
# - main
# - dev
merge_group:
push:
branches:
- main
- dev
# push:
# branches:
# - main
# - develop
name: "Build & Release"
jobs:
build:
name: Build & Release
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up java 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
- name: Flutter get depedency
run: flutter pub get
- name: flutter build apk debug
run: flutter build apk --debug
- name: Push to releases debug
if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'dev'
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/debug/*"
tag: v1.0.${{ github.run_number }}-Debug
token: ${{ secrets.TOKEN }}
- name: flutter build apk
run: flutter build apk
- name: Push to releases release
if: github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'main'
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*"
tag: v1.0.${{ github.run_number }}-Debug
token: ${{ secrets.TOKEN }}