-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 2.19 KB
/
create_release.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
name: Create Release
on:
push:
branches: master
tags:
- v*
permissions:
contents: write
jobs:
release_build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup JDK
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Create local gradle properties files
run: touch local.properties
- name: Add Google Maps API Key
run: echo "MAPS_API_KEY=${{secrets.MAPS_API_KEY}}" >> local.properties
# Here we need to decode keystore.jks from base64 string and place it
# in the folder specified in the release signing configuration
- name: Decode Keystore
id: decode_keystore
uses: timheuer/[email protected]
with:
fileName: 'android_keystore.jks'
fileDir: '/home/runner/work/<<project name>>/<<project name>>/app/keystore/'
encodedString: ${{ secrets.SIGNING_KEYSTORE }}
- name: Build Release APK
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
run: ./gradlew build -x lint -x lintVitalRelease
- name: Build Release Bundle
run: ./gradlew bundleRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Upload Build to artifacts
uses: actions/[email protected]
with:
name: release-artifacts
path: |
app/build/outputs/debug/app-debug.apk
app/build/outputs/bundle/release/
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
files: |
app/build/outputs/apk/debug/app-debug.apk
app/build/outputs/bundle/release/app-release.aab