-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (76 loc) · 2.47 KB
/
build.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: Build APK and testing-release
on:
workflow_dispatch:
pull_request:
push:
branches:
- develop
tags-ignore:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build nl.eduid Release APK
run: bash ./gradlew assembleRelease --stacktrace
build-testing:
needs: [build-prod]
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build nl.eduid.testing Bundle for Play store upload
run: ./gradlew bundleDebug
- name: Sign nl.eduid.testing Bundle with developer key for Play store upload
id: sign_aab
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/debug/
signingKeyBase64: ${{ secrets.SIGNINGKEYBASE64 }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEYSTOREPASSWORD }}
keyPassword: ${{ secrets.KEYPASSWORD }}
- name: Publish nl.eduid.testing to play store internal test track
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: nl.eduid.testing
releaseFiles: ${{ steps.sign_aab.outputs.signedReleaseFile }}
track: internal
status: completed