-
-
Notifications
You must be signed in to change notification settings - Fork 17
102 lines (85 loc) · 3.06 KB
/
build-deploy.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build and deploy to PlayStore and GitHub
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+**'
env:
BUILD_TOOLS_VERSION: 34.0.0
PRE_RELEASE: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
jobs:
build-playstore:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create google_services.json
id: createGoogleServicesJson
run: echo '${{ secrets.GOOGLE_SERVICES }}' > app/google-services.json
- name: Build Release AAB
id: buildRelease
run: ./gradlew bundlePlaystoreRelease
- name: Sign Release AAB
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/playstoreRelease
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Create service_account.json
id: createServiceAccount
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
- name: Publish to Play Store BETA
id: publish
uses: r0adkll/[email protected]
with:
serviceAccountJson: service_account.json
packageName: be.casperverswijvelt.unifiedinternetqs
releaseFile: ${{ env.SIGNED_RELEASE_FILE }}
track: beta
build-github:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create google_services.json
id: createGoogleServicesJson
run: echo '${{ secrets.GOOGLE_SERVICES }}' > app/google-services.json
- name: Build Release APK
id: buildRelease
run: ./gradlew assembleGithubRelease
- name: Sign Release APK
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/github/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: ${{ env.SIGNED_RELEASE_FILE }}
asset_name: app-release-github.apk
tag: ${{ github.ref }}
overwrite: true
prerelease: ${{ env.PRE_RELEASE }}
body: "Automatically released using GitHub actions. Release-notes will follow later."