-
-
Notifications
You must be signed in to change notification settings - Fork 39
108 lines (87 loc) · 3.2 KB
/
distribution_app.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
103
104
105
106
107
108
name: Distribution App
on:
# push:
# branches:
# - master
# - develop
# paths-ignore:
# - '**.md'
# - '.idea/**'
# - '.github/**'
# - 'config/**'
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21
- name: Make Gradlew Executable
run: chmod +x ./gradlew
- name: Decode Keystore File
id: decode_keystore_file
uses: timheuer/base64-to-file@v1
with:
fileName: 'keystore_release.jks'
encodedString: ${{ secrets.KEYSTORE_FILE }}
- name: Set Decoded File Location as Environment
run: echo "KEYSTORE_FILE=${{ steps.decode_keystore_file.outputs.filePath }}" >> $GITHUB_ENV
- name: Build GmsDebug Artifact
run: ./gradlew androidApp:assembleGmsDebug
- name: Build HmsDebug Artifact
run: ./gradlew androidApp:assembleHmsDebug
- name: Build FossDebug Artifact
run: ./gradlew androidApp:assembleFossDebug
- name: Build GmsRelease Artifact
run: ./gradlew androidApp:assembleGmsRelease
- name: Build HmsRelease Artifact
run: ./gradlew androidApp:assembleHmsRelease
- name: Build FossRelease Artifact
run: ./gradlew androidApp:assembleFossRelease
# - name: Build GmsBundle Artifact
# run: ./gradlew androidApp:bundleGmsRelease
# - name: Upload Artifacts to Outputs
# uses: actions/upload-artifact@v2
# with:
# path: |
# androidApp/build/outputs/apk
# androidApp/build/outputs/bundle
# - name: Distribute Artifacts via Firebase
# run: ./gradlew appDistributionUploadRelease
# env:
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# - name: Create Service Account JSON File
# run: echo '${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}' > service_account.json
# - name: Upload Bundle to Google Play Console
# uses: sokchanbo/[email protected]
# with:
# service-account: service_account.json
# package-name: org.michaelbel.template
# release-file: app/build/outputs/bundle/**/*.aab
# track: internal
- name: Telegram Message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
disable_notification: false
disable_web_page_preview: true
document: androidApp/build/outputs/apk/**/**/*.apk
message_file: ./releaseNotes.txt