Skip to content

릴리즈 빌드를 봅시다 #794

릴리즈 빌드를 봅시다

릴리즈 빌드를 봅시다 #794

Workflow file for this run

name: CI
on:
pull_request:
branches:
- 'develop'
push:
branches:
- 'develop'
jobs:
cancel-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
static-check:
runs-on: ubuntu-latest
needs: cancel-workflow
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
- name: Clean build
run: ./gradlew clean
- name: Run ktlintDebug
run: ./gradlew ktlintMainSourceSetCheck
- name: Upload ktlint report
uses: actions/upload-artifact@v2
if: failure()
with:
name: ktlint-result
path: ./**/build/reports/ktlint/**/*.html
build:
runs-on: ubuntu-latest
needs: static-check
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
- name: Clean build
run: ./gradlew clean
- name: Setup google-services.json (Staging)
run: |
mkdir -p ./app/src/staging
cat << EOF > ./app/src/staging/google-services.json
${{ secrets.google_services_json_staging }}
EOF
- name: Setup secrets.xml (Staging)
run: |
mkdir -p ./app/src/staging/res/values
cat << EOF > ./app/src/staging/res/values/secrets.xml
${{ secrets.secrets_xml_staging }}
EOF
- name: Build debug APK
run: ./gradlew assembleStagingDebug --stacktrace
build-live:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
- name: Clean build
run: ./gradlew clean
- name: Setup google-services.json (Live)
run: |
mkdir -p ./app/src/live
cat << EOF > ./app/src/live/google-services.json
${{ secrets.google_services_json_live }}
EOF
- name: Setup gcp-service-account.json (Live)
run: |
cat << EOF > ./gcp-service-account-live.json
${{ secrets.app_distribution_service_account_live }}
EOF
- name: Setup secrets.xml (Live)
run: |
mkdir -p ./app/src/live/res/values
cat << EOF > ./app/src/live/res/values/secrets.xml
${{ secrets.secrets_xml_live }}
EOF
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.KEYSTORE }}
run: |
mkdir -p ./app/keystore
echo $ENCODED_STRING | base64 -di > ./app/keystore/android.jks
- name: Build production apk
run: ./gradlew bundleLiveRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Slack Upload APK
uses: MeilCli/slack-upload-file@v1
with:
slack_token: ${{ secrets.SLACK_READ_WRITE_TOKEN }}
channels: ${{ secrets.SLACK_DEPLOY_CHANNEL }}
file_path: './app/build/outputs/bundle/liveRelease/app-live-release.aab'
file_name: 'app-live-release.aab'
file_type: 'aab'
initial_comment: 'live-release AAB'
- name: Upload artifact to Firebase App Distribution
run: ./gradlew appDistributionUploadLiveRelease