Skip to content

Release 1.0.0v

Release 1.0.0v #11

name: Released-App-Distribution
on:
pull_request:
branches:
- 'release'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
cache: gradle
- name: add google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: add local.properties
run: |
echo api_key=\"${{ secrets.API_KEY }}\" >> ./local.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Build release APK
run: ./gradlew assembleRelease
- name: Sign APK
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEY_BASE_64_RELEASE }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Authenticate to Firebase
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
- name: Setup Firebase CLI
run: curl -sL https://firebase.tools | bash
- name: upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: WAPP_QA
file: ${{steps.sign_app.outputs.signedReleaseFile}}
- name: Send Success Message
if: ${{ success() }}
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: WAPP_BOT
DISCORD_AVATAR: https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true
DISCORD_EMBEDS: |
[
{
"author": {
"name": "WAPP Release",
"url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true",
"icon_url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true"
},
"title": "릴리즈 성공, 자 두 과 자 ~ 🔥🔥",
"color": 10478271,
"description": "메일에 새로운 릴리즈 앱 배송완료했어요!"
}
]
- name: Send Failure Message
if: ${{ failure() }}
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: WAPP_BOT
DISCORD_AVATAR: https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true
DISCORD_EMBEDS: |
[
{
"author": {
"name": "WAPP Release",
"url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true",
"icon_url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true"
},
"title": "릴리즈 실패, 누가 이렇게 하래. 😭😭",
"color": 13458524,
"description": "다시 릴리즈 해오세요. 삐빅"
}
]