-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.81 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
name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+'
jobs:
release:
name: Publish on Google Play
runs-on: [ self-hosted, macOS ]
timeout-minutes: 45
env:
BUILD_NUMBER: ${{ github.run_number }}
steps:
# Checkout - https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v4.1.7
# Setup Java - https://github.com/actions/setup-java
- name: Set up JDK 21
uses: actions/setup-java@v4.3.0
with:
distribution: 'temurin'
java-version: '21'
- name: Check JDK version
run: java -version
# Setup Android - https://github.com/android-actions/setup-android
- name: Setup Android SDK
uses: android-actions/setup-android@v3.2.1
# Decode Keystore
- name: Decode Keystore
env:
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
run: |
echo RELEASE_KEYSTORE_BASE64 > release.txt
base64 -d release.txt > release.jks
# Build and deploy - https://github.com/gradle/gradle-build-action
- name: Build and Publish App on Google Play
uses: gradle/actions/setup-gradle@v3.5.0
env:
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASS: ${{ secrets.RELEASE_KEY_PASS }}
with:
gradle-version: wrapper
arguments: publishProdReleaseBundle --stacktrace
# Create GitHub release - https://github.com/softprops/action-gh-release
- name: GitHub Release
uses: softprops/action-gh-release@v2.1.0
with:
name: Twilight ${{ env.GITHUB_REF_NAME }}
# Set VERSION_INFORMATION
- run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersionInformation)" >> $GITHUB_ENV
continue-on-error: true