Skip to content

Merge pull request #505 from Team-WSS/feat/476 #5

Merge pull request #505 from Team-WSS/feat/476

Merge pull request #505 from Team-WSS/feat/476 #5

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:
BASE_URL: ${{ secrets.BASE_URL }}
S3_BASE_URL: ${{ secrets.S3_BASE_URL }}
KAKAO_APP_KEY: ${{ secrets.KAKAO_APP_KEY }}
AMPLITUDE_KEY: ${{ secrets.AMPLITUDE_KEY }}
run: |
echo base.url=\"$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