-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (64 loc) · 2.35 KB
/
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
72
73
74
75
76
77
78
name: Release a new version
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/[email protected]
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: "changelog_config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Keystore
shell: bash
run: |
echo '${{ secrets.KEYSTORE_FILE }}' | base64 -d > ./androidApp/ludi_keystore.jks
echo "storeFile=./ludi_keystore.jks" >> keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties
env:
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.STORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.STORE_KEY_PASSWORD }}
- name: Create Play Config file
run: |
echo "$PLAY_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
env:
PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG }}
- name: Build & Publish Release (.aab) bundle to Play console
run: ./gradlew bundleRelease publishReleaseBundle
- name: Build release APK
run: ./gradlew assembleRelease --stacktrace
- name: Upload release APK
uses: actions/upload-artifact@v3
with:
name: app-release
path: ./androidApp/build/outputs/apk/release/androidApp-release.apk
- uses: ncipollo/release-action@v1
with:
artifacts: "./androidApp/build/outputs/apk/release/androidApp-release.apk"
body: ${{ steps.build_changelog.outputs.changelog }}