-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 2.26 KB
/
prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: 프로덕션 빌드
on:
pull_request:
branches:
- main
types: [ closed ]
jobs:
production-build:
runs-on: macos-latest
environment: production
steps:
- name: 브랜치 가져오기
uses: actions/checkout@v2
- name: Ruby 설정하기
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
bundler-cache: true
- name: JDK17 준비하기
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Gradle 애드온 준비하기
uses: gradle/gradle-build-action@v2
- name: 시크릿 파일 생성하기
run: |
echo "$PLAYSTORE_SA" > play_keyfile.json && \
echo "$GCP_FASTLANE_SA" > gcp_keyfile.json && \
echo "$GENERIC_APP_SECRETS" > secrets.properties && \
echo "$GOOGLE_SERVICES_JSON" > app/google-services.json && \
echo "$APP_SIGNING_SECRET" > ./keystore.b64 && \
base64 -d -i ./keystore.b64 > ./app/bbibbi_android
env:
PLAYSTORE_SA: ${{ secrets.PLAYSTORE_SA }}
GCP_FASTLANE_SA: ${{ secrets.GCP_FASTLANE_SA }}
GENERIC_APP_SECRETS: ${{ secrets.GENERIC_APP_SECRETS }}
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
APP_SIGNING_SECRET: ${{ secrets.APP_SIGNING_SECRET }}
- name: Fastlane 배포하기
run: bundle exec fastlane deploy_production
env:
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SERVICE_CREDENTIAL_FILE_PATH: gcp_keyfile.json
GOOGLE_CREDENTIAL_FILE_PATH: play_keyfile.json
- name: 브랜치명 추출하기
id: branch-name
uses: tj-actions/[email protected]
- name: 버전 정보 추출
run: echo "TAG=$(echo '${{ steps.branch-name.outputs.current_branch }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" >> $GITHUB_ENV
id: extract_version_name
- name: Release 생성
if: github.event.pull_request.merged == true
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }}
release_name: ${{ env.TAG }}