-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (42 loc) Β· 1.54 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
name: Release Firebase Distribution Workflow
on:
push:
branches:
- release/**
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Decode keystore
run: echo "${{ secrets.RELEASE_KEYSTORE_BASE64 }}" | base64 --decode > keystore/release.keystore.jks
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: gradle-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-cache-${{ runner.os }}-
- name: Build APK
run: ./gradlew assembleRelease
- name: Verify APK Existence
run: test -f app/build/outputs/apk/release/app-release.apk
- name: Generate Release Notes
id: release-notes
run: echo "RELEASE_NOTES=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
- name: Upload to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: hmh-team
file: app/build/outputs/apk/release/app-release.apk
releaseNotes: ${{ env.RELEASE_NOTES }}