-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (64 loc) · 2.51 KB
/
prchecker.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
name: PR Check
on:
pull_request:
branches:
- main
env:
JAVA_VERSION: "12.x"
FLUTTER_CHANNEL: "stable"
PROPERTIES_PATH: "./android/key.properties"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
# Setup Java environment in order to build the Android app.
- uses: actions/setup-java@v1
with:
java-version: ${{env.JAVA_VERSION}}
cache: "gradle"
# Gradle cache for faster builds
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: ${{env.FLUTTER_CHANNEL}}
cache: true
- run: |
echo storePassword=${{ secrets.STORE_PASSWORD }} >> ${{env.PROPERTIES_PATH}}
echo keyPassword=${{ secrets.KEY_PASSWORD }} >> ${{env.PROPERTIES_PATH}}
echo keyAlias=${{ secrets.KEY_ALIAS }} >> ${{env.PROPERTIES_PATH}}
echo storeFile=/home/runner/work/Soundal/Soundal/android/app/keystore.jks >> ${{env.PROPERTIES_PATH}}
echo ${{ secrets.KEYSTORE }} | base64 --decode > /home/runner/work/Soundal/Soundal/android/app/keystore.jks
# Get flutter dependencies.
- run: flutter pub get
# Check for any formatting issues in the code.
- run: dart format --set-exit-if-changed .
# Statically analyze the Dart code for any errors.
- run: flutter analyze .
# Run widget tests for our flutter project.
- run: flutter test
# Build apk.
- run: flutter build apk --debug --split-per-abi
# Upload generated apk to the artifacts.
- uses: actions/upload-artifact@v2
with:
name: app-arm64-v8a-debug.apk
path: build/app/outputs/apk/release/app-arm64-v8a-debug.apk
# - name: Commit on Telegram
# uses: appleboy/telegram-action@master
# with:
# to: ${{ secrets.TELEGRAM_USER_ID }}
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
# format: markdown
# disable_web_page_preview: true
# message: |
# New PR raised to [${{ github.event.repository.name }}](${{ github.event.repository.html_url }}) by [${{ github.event.sender.name }}](${{ github.event.sender.html_url }}).
# document: build/app/outputs/apk/release/app-arm64-v8a-debug.apk