Skip to content

Merge pull request #99 from Dugout-Developers/feature/nofitication #23

Merge pull request #99 from Dugout-Developers/feature/nofitication

Merge pull request #99 from Dugout-Developers/feature/nofitication #23

name: Build & upload to Firebase App Distribution
on:
push:
branches: [ develop ] # dev 브런치에 push가 올 때 이벤트 트리거
jobs:
build:
runs-on: ubuntu-latest # 이후의 jobs들은 ubuntu의 최신버전에서 실행한다.
env:
LOCAL_PROPERTIES_CONTENTS: ${{ secrets.LOCAL_PROPERTIES_CONTENTS }} # scerets에서 로컬 프로퍼티 값 변수(LOCAL_PROPERTIES_CONTENTS)로 설정
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} # scerets에서 구글 제이슨 값 변수(GOOGLE_SERVICES_JSON)로 설정
steps:
- uses: actions/checkout@v1
- name: set up JDK 17 # 깃허브 runner에서 돌아가는 환경은 java 17버전으로 설정한다.
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant Permission for gradlew # gradlew 에 대한 퍼미션을 허용한다.
run: chmod +x gradlew
working-directory: CatchMate
shell: bash
- name: Create google-services.json # 환경변수(GOOGLE_SERVICES_JSON) 값의 내용을 기반으로 `app/google-services.json`를 만든다.
run: echo "$GOOGLE_SERVICES_JSON" > app/google-services.json
working-directory: CatchMate
- name: Create local.properties # (LOCAL_PROPERTIES_CONTENTS)를 기반으로 local.properties를 만들고 keystore.jks 위치를 추가해 준다.
run: |
echo "$LOCAL_PROPERTIES_CONTENTS" > local.properties
working-directory: CatchMate
- name: Build debug # APK를 빌드한다. (디버그용)
run: ./gradlew :app:assembleDebug
working-directory: CatchMate
- name: Authenticate to Firebase
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
- name: Upload to Firebase App Distribution # 파이어베이스에 앱 디스트리 뷰션에 배포한다.
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: AOSTest
file: CatchMate/app/build/outputs/apk/debug/app-debug.apk