ruby setting (#100) #6
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 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 | |
# 아래 cd 부분에 추가하고 싶지만, jks 파일을 디코딩 해줘야 아래 run 빌드가 잘 작동할 것이라 생각해서 여기에 추가함 | |
- 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@v3 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 17 | |
# Fastlane 위한 Ruby Setting | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.2 | |
bundler: "Gemfile.lock" | |
bundler-cache: true | |
# Fastlane Setting | |
- name: Set Up fastlane And Publish Google Play | |
uses: maierj/[email protected] | |
with: | |
lane: 'productionDeploy' | |
env: | |
SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} |