Skip to content

Commit

Permalink
chore: ci/cd yaml 작성 (초안)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heonbyeong committed Jul 23, 2024
1 parent d39559b commit f6db51c
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,50 @@ name: Android CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
branches: [ "release/release" ]

jobs:
build:

runs-on: ubuntu-latest
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build

- name: Clean Build
run: ./gradlew clean

- name: Check Code Convention
run: ./gradlew ktlintCheck

- name: Decode Service Account Key
env:
SERVICE_ACCOUNT_KEY_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}
run: |
echo $SERVICE_ACCOUNT_KEY_BASE64 | base64 --decode > service_account_key.json
- name: Decode Keystore File
env:
KEY_STORE_BASE64: ${{ secrets.KEYSTORE_FILE }}
run: |
echo $KEY_STORE_BASE64 | base64 --decode > moneymong_keystore.keystore
- name: Build & Deploy Android release
env:
SERVICE_ACCOUNT_KEY: service_account_key.json
KEYSTORE_FILE: moneymong_keystore.keystore
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
run: bundle exec fastlane deploy

- name: Remove Credential
run: rm service_account_key.json moneymong_keystore.keystore

0 comments on commit f6db51c

Please sign in to comment.