refactor: 빌드 옵션에 따른 도메인 분리 #15
Workflow file for this run
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 | |
on: | |
push: | |
branches: [ "develop", "release_wss", "release/*", "hotfix" ] | |
pull_request: | |
branches: [ "develop", "release_wss", "release/*", "hotfix" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Load Google Service file | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo $DATA | base64 -di > app/google-services.json | |
- name: Create local.properties | |
env: | |
DEBUG_BASE_URL: ${{ secrets.DEBUG_BASE_URL }} | |
RELEASE_BASE_URL: ${{ secrets.RELEASE_BASE_URL }} | |
S3_BASE_URL: ${{ secrets.S3_BASE_URL }} | |
KAKAO_APP_KEY: ${{ secrets.KAKAO_APP_KEY }} | |
AMPLITUDE_KEY: ${{ secrets.AMPLITUDE_KEY }} | |
run: | | |
echo debug.base.url=\"$DEBUG_BASE_URL\" >> ./local.properties | |
echo release.base.url=\"$RELEASE_BASE_URL\" >> ./local.properties | |
echo s3.url=\"$S3_BASE_URL\" >> ./local.properties | |
echo kakao.app.key=\"$KAKAO_APP_KEY\" >> ./local.properties | |
echo amplitude.key=\"$AMPLITUDE_KEY\" >> ./local.properties | |
- name: Run Ktlint | |
uses: ScaCap/action-ktlint@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
android: true | |
fail_on_error: true | |
reporter: github-pr-review | |
- name: Build with Gradle | |
run: ./gradlew build |