fix: android-deploy.yml 수정 #3
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: Android CI/CD | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
LOCAL_PROPERTIES_CONTENTS: ${{ secrets.LOCAL_PROPERTIES_CONTENTS }} | ||
FLAVOR: "prod" # 여기서 FLAVOR를 "prod"로 설정합니다. | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v2 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Create local.properties | ||
run: | | ||
echo "$LOCAL_PROPERTIES_CONTENTS" > local.properties | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Build Release AAB | ||
id: buildRelease | ||
run: ./gradlew bundle${{ env.FLAVOR.capitalize() }}Release | ||
Check failure on line 39 in .github/workflows/android-deploy.yml GitHub Actions / Android CI/CDInvalid workflow file
|
||
- name: Verify AAB file exists | ||
run: | | ||
AAB_FILE=app/build/outputs/bundle/${{ env.FLAVOR }}Release/app-${{ env.FLAVOR }}-release.aab | ||
if [ ! -f $AAB_FILE ]; then | ||
echo "Error: AAB file not found at $AAB_FILE" | ||
exit 1 | ||
fi | ||
- name: Sign AAB | ||
id: sign | ||
uses: r0adkll/sign-android-release@v1 | ||
with: | ||
releaseDirectory: app/build/outputs/bundle/${{ env.FLAVOR }}Release | ||
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | ||
alias: ${{ secrets.ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
- name: Create service_account.json | ||
id: createServiceAccount | ||
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json | ||
- name: Deploy to Play Store (BETA) | ||
id: deploy | ||
uses: r0adkll/upload-google-play@v1 | ||
with: | ||
serviceAccountJson: service_account.json | ||
packageName: com.easyhz.noffice | ||
releaseFile: app/build/outputs/bundle/${{ env.FLAVOR }}Release/app-${{ env.FLAVOR }}-release.aab | ||
track: beta | ||
whatsNewDirectory: whatsnew/ |