Skip to content

aab build task (#110) #17

aab build task (#110)

aab build task (#110) #17

Workflow file for this run

name: Android CD
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false"
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
on:
push:
branches: [ main ]
jobs:
# cd-build:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - 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: Setup Gradle
# uses: gradle/gradle-build-action@v2
# with:
# gradle-home-cache-cleanup: true
# - name: Generate secrets.properties
# run: |
# echo "SERVER_BASE_URL=${{ secrets.SERVER_BASE_URL }}" >> secrets.properties
# - name: Decode Keystore
# id: decode_keystore
# uses: timheuer/base64-to-file@v1
# with:
# fileName: '/app/bandalart.jks'
# encodedString: ${{secrets.APP_RELEASE_KEY_STORE_BASE_64}}
# - name: Generate keystore.properties
# run: |
# echo "STORE_FILE=${{ secrets.STORE_FILE }}" >> keystore.properties
# echo "STORE_PASSWORD=${{ secrets.STORE_PASSWORD }}" >> keystore.properties
# echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> keystore.properties
# echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> keystore.properties
# - name: Code style checks
# run: ./gradlew ktlintCheck detekt
# - name: Run build
# run: ./gradlew buildDebug --stacktrace
# 이 위까지는 만일 핫픽스로 급한 경우에 바로 main에 push 할 경우가 생길 수 있으므로 ci 보존
publish_aab:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# JDK 설정
- 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: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Generate secrets.properties
run: |
echo "SERVER_BASE_URL=${{ secrets.SERVER_BASE_URL }}" >> secrets.properties
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: '/app/bandalart.jks'
encodedString: ${{secrets.APP_RELEASE_KEY_STORE_BASE_64}}
- name: Generate keystore.properties
run: |
echo "STORE_FILE=${{ secrets.STORE_FILE }}" >> keystore.properties
echo "STORE_PASSWORD=${{ secrets.STORE_PASSWORD }}" >> keystore.properties
echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> keystore.properties
echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> keystore.properties
# Fastlane 위한 Ruby Setting
- uses: ruby/setup-ruby@v1
with:
bundler: "Gemfile.lock"
ruby-version: 2.7.2
bundler-cache: true
# Fastlane Setting
- name: Set Up fastlane And Publish Google Play
uses: maierj/fastlane-action@v2.2.0
with:
lane: 'productionDeploy'
env:
SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}