Skip to content

GifticonDetail 구현 #128

GifticonDetail 구현

GifticonDetail 구현 #128

Workflow file for this run

name: Android CD
on:
workflow_dispatch:
inputs:
build-type:
description: "생성할 Build Type 설정"
required: true
default: 'Debug'
type: choice
options:
- Debug
- Release
push:
branches: [ main ]
jobs:
build:
name: Beep CD
runs-on: ubuntu-latest
env:
DEBUG: 'Debug'
RELEASE: 'Release'
BUILD_TYPE: ${{ inputs.build-type != '' && inputs.build-type || 'Release' }}
steps:
- uses: actions/checkout@v1
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Create Keystore Properties
run: echo '${{ secrets.KEYSTORE_PROPERTIES }}' > ./keystore.properties
- name: Create Keystore
run: |
if [ ${{ env.BUILD_TYPE }} == ${{env.DEBUG}} ]; then
echo '${{ secrets.KEYSTORE_DEBUG_JKS }}' | base64 -d > ./beep-debug.jks
elif [ ${{ env.BUILD_TYPE }} == ${{env.RELEASE}} ]; then
echo '${{ secrets.KEYSTORE_RELEASE_JKS }}' | base64 -d > ./beep-release.jks
else
exit 1
fi
- name: Create Google Service
run: |
echo '${{ secrets.GOOGLE_SERVICE_JSON }}' > ./auth/google-services.json
echo '${{ secrets.GOOGLE_SERVICE_JSON_APP }}' > ./app/google-services.json
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run On Build
run: |
buildType=$(echo ${{env.BUILD_TYPE}} | tr '[:upper:]' '[:lower:]')
./gradlew -Psplit clean -w assemble${{ env.BUILD_TYPE }}
mv app/build/outputs/apk/$buildType/app-$buildType.apk beep.apk
- name: Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: "team, Boostcamp"
file: beep.apk
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: 안드로이드 ${{ env.BUILD_TYPE }}
fields: repo, commit ,message, author, took
mention: audxo112
if_mention: failure, cancelled
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DEPLOY }}
if: always()