Merge pull request #314 from team-haribo/develop #29
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: Goms-Android CD | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Cache Gradle packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Create LOCAL_PROPERTIES | |
run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties | |
- name: Create service_account.json | |
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json | |
- name: Assemble Release Bundle | |
run: ./gradlew bundleRelease | |
- name: Sign Release | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Upload AAB | |
uses: actions/upload-artifact@v1 | |
with: | |
name: app | |
path: app/build/outputs/bundle/release/app-release.aab | |
- name: Deploy to production | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJson: service_account.json | |
packageName: com.goms.goms_android_v2 | |
releaseFiles: app/build/outputs/bundle/release/app-release.aab | |
track: production | |
- name: Goms Android CD Discord Notification | |
uses: sarisia/actions-status-discord@v1 | |
if: ${{ success() }} | |
with: | |
title: ✅ Goms-Android-CD 성공! ✅ | |
webhook: ${{ secrets.GOMS_DISCORD_WEBHOOK }} | |
status: ${{ job.status }} | |
image: ${{ secrets.SUCCESS_IMAGE }} | |
description: 드가자아!!! | |
color: 00FF00 | |
url: "https://github.com/sarisia/actions-status-discord" | |
username: GOMS CD 봇 | |
- name: Goms Android CD Discord Notification | |
uses: sarisia/actions-status-discord@v1 | |
if: ${{ failure() }} | |
with: | |
title: ❗️ Goms-Android-CD 실패! ❗️ | |
webhook: ${{ secrets.GOMS_DISCORD_WEBHOOK }} | |
status: ${{ job.status }} | |
image: ${{ secrets.FAIL_IMAGE }} | |
description: 까비요 | |
color: 00FF00 | |
url: "https://github.com/sarisia/actions-status-discord" | |
username: GOMS CD 봇 |