-
Notifications
You must be signed in to change notification settings - Fork 34
59 lines (56 loc) · 1.51 KB
/
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
name: Analyze, Build, Release APK
on:
push:
tags:
- "v*"
jobs:
test:
name: Analyze project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.7"
cache: true
- run: flutter pub get
- run: flutter analyze
# - run: flutter test
build_apk:
needs: [test]
name: Build & Release APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
cache: "gradle"
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.7"
cache: true
- run: flutter pub get
- run: flutter build apk --release
- name: Create a Release APK
uses: ncipollo/release-action@v1
with:
name: "Analog Clock ${{ github.ref_name }}"
artifacts: "build/app/outputs/apk/release/*.apk"
token: ${{ secrets.TOKEN }}