Skip to content

fix: 안드로이드 cd 배포 시 개인정보 페이지 열리지 않는 문제 수정 #14

fix: 안드로이드 cd 배포 시 개인정보 페이지 열리지 않는 문제 수정

fix: 안드로이드 cd 배포 시 개인정보 페이지 열리지 않는 문제 수정 #14

Workflow file for this run

name: android cd
on:
pull_request:
branches:
- main
types:
- closed
defaults:
run:
working-directory: android
jobs:
deploy:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release-an/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Add google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Add local.properties
env:
BASE_DEV_URL: ${{secrets.BASE_DEV_URL}}
BASE_PROD_URL: ${{secrets.BASE_PROD_URL}}
KAKAO_API_KEY: ${{secrets.KAKAO_API_KEY}}
KAKAO_NATIVE_KEY: ${{secrets.KAKAO_NATIVE_KEY}}
TERM_URI: ${{secrets.TERM_URI}}
PRIVACY_POLICY_URL: ${{secrets.PRIVACY_POLICY_URI}}
run: |
echo "BASE_DEV_URL=\"$BASE_DEV_URL\"" >> ./local.properties
echo "BASE_PROD_URL=\"$BASE_PROD_URL\"" >> ./local.properties
echo "KAKAO_API_KEY=\"$KAKAO_API_KEY\"" >> ./local.properties
echo "KAKAO_NATIVE_KEY=\"$KAKAO_NATIVE_KEY\"" >> ./local.properties
echo "TERM_URI=\"$TERM_URI\"" >> ./local.properties
echo "PRIVACY_POLICY_URI=\"$PRIVACY_POLICY_URI\"" >> ./local.properties
- name: Change gradlew permissions
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew bundleRelease
- name: Sign app aab
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: /home/runner/work/2024-ody/2024-ody/android/app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Deploy to play console
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.mulberry.ody
releaseFiles: /home/runner/work/2024-ody/2024-ody/android/app/build/outputs/bundle/release/app-release.aab
track: production
status: completed