PlayStore CD #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PlayStore CD | |
on: | |
workflow_dispatch: | |
jobs: | |
firebase: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Gradle cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Update Secrets | |
env: | |
KOIN_STORE_PASSWORD: ${{ secrets.KOIN_STORE_PASSWORD}} | |
NAVER_MAP_KEY: ${{ secrets.NAVER_MAP_KEY}} | |
SECRET_KEY : ${{ secrets.SECRET_KEY }} | |
PROPERTIES : ${{ secrets.PROPERTIES }} | |
run: | | |
echo $PROPERTIES | base64 -di > ./local.properties | |
echo $SECRET_KEY | base64 -di > ./koin/team_kap_android.jks | |
for file in $(find . -name 'local.properties') | |
do | |
echo $file | |
done | |
for file in $(find . -name 'team_kap_android.jks') | |
do | |
echo $file | |
done | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install -g firebase-tools | |
- name: Update Firebase | |
env: | |
FIREBASE: ${{ secrets.FIREBASE }} | |
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | |
run: | | |
echo $FIREBASE | base64 -di > ./koin/google-services.json | |
echo $GOOGLE_CREDENTIALS | base64 -di > ./google-credentials.json | |
echo "GOOGLE_CREDENTIALS_TEXT=$(echo $(cat ./google-credentials.json ))" >> $GITHUB_ENV | |
for file in $(find . -name 'google-services.json') | |
do | |
echo $file | |
done | |
for file in $(find . -name 'google-credentials.json') | |
do | |
echo $file | |
done | |
- name: Build with Gradle | |
run: ./gradlew koin:assembleRelease | |
- name: Upload to Firebase | |
env: | |
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | |
GOOGLE_APPLICATION_CREDENTIALS : "./google-credentials.json" | |
run: | | |
apk_path="./koin/build/outputs/apk/release/koin-release.apk" | |
firebase \ | |
appdistribution:distribute \ | |
"$apk_path" \ | |
--app "$FIREBASE_PROJECT_ID" \ | |
--groups "bcsd" \ | |
--debug | |
playstore: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Gradle cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Update Secrets | |
env: | |
KOIN_STORE_PASSWORD: ${{ secrets.KOIN_STORE_PASSWORD}} | |
NAVER_MAP_KEY: ${{ secrets.NAVER_MAP_KEY}} | |
SECRET_KEY : ${{ secrets.SECRET_KEY }} | |
PROPERTIES : ${{ secrets.PROPERTIES }} | |
run: | | |
echo $PROPERTIES | base64 -di > ./local.properties | |
echo $SECRET_KEY | base64 -di > ./koin/team_kap_android.jks | |
for file in $(find . -name 'local.properties') | |
do | |
echo $file | |
done | |
for file in $(find . -name 'team_kap_android.jks') | |
do | |
echo $file | |
done | |
- name: Update Firebase | |
env: | |
FIREBASE: ${{ secrets.FIREBASE }} | |
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | |
run: | | |
echo $FIREBASE | base64 -di > ./koin/google-services.json | |
echo $GOOGLE_CREDENTIALS | base64 -di > ./google-credentials.json | |
for file in $(find . -name 'google-services.json') | |
do | |
echo $file | |
done | |
for file in $(find . -name 'google-credentials.json') | |
do | |
echo $file | |
done | |
- name: Build with Gradle | |
run: ./gradlew koin:bundleRelease | |
- name: Upload AAB to Internal testing | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: in.koreatech.koin | |
releaseFiles: koin/build/outputs/bundle/release/koin-release.aab | |
track: internal | |
status: completed | |
mappingFile: koin/build/outputs/mapping/release/mapping.txt | |
- name: Upload to Slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: Android Production Deploy | |
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: always() |