-
-
Notifications
You must be signed in to change notification settings - Fork 38
64 lines (56 loc) · 2.09 KB
/
lint-and-build-job.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
name: Build & upload to Firebase App Distribution
on:
push:
branches:
- main
jobs:
ktlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install ktlint
run: |
curl -sSLO "https://github.com/pinterest/ktlint/releases/download/0.42.1/ktlint"
chmod a+x ktlint
sudo mv ktlint /usr/local/bin/
- name: Run ktlint
run: |
ktlint --version
ktlint -F --disabled_rules=no-wildcard-imports --reporter=checkstyle,output=build/ktlint-report.xml || true
continue-on-error: true
- name: Upload ktlint report
uses: actions/upload-artifact@v2
with:
name: ktlint-report
path: build/ktlint-report.xml
build:
needs: ktlint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build Release
run: ./gradlew assembleRelease -PversionName=$VERSION
- name: Set Version Environment Variable
run: echo "::set-env name=VERSION::$(git describe --tags $(git rev-list --tags --max-count=1))"
- name: Rename APK file
run: mv app/build/outputs/apk/release/Animity-v$VERSION-arm64-v8a-release-unsigned.apk app/build/outputs/apk/release/Animity-$VERSION-arm64-v8a-release-unsigned.apk
- uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload Artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
token: ${{ secrets.FIREBASE_TOKEN }}
groups: animity-tester
file: app/build/outputs/apk/release/Animity-$VERSION-arm64-v8a-release-unsigned.apk