-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: version up * feat: drop DB * feat: 임시 방편으로 프로세스 실행시 테이블 드롭하고 Room 다시 생성 * fix: Intro -> Home으로 갈때 Activity Stack 전부 비우기 * fix: warmUp 에서 예외 발생시 예외 처리 * feat: Android Release CD * build: CD, CI main 에 돌리기 * fix: 명령어에 $ 추가 * fix: keystore 경로 추가 * fix: work directory 설정 * build: version 으로 tag 생성해서 release 노트 만듬 * build: Release CI, CD 분리 * build: PR closed 될때 머지되도록 수정 * fix: 브랜치 이름으로 버전 추출하도록 변경 * add release folder * tag_name, release_name 삭제해보자 * tag 일때만 동작하도록 * style ktformat * feat: dataBase Drop 삭제
- Loading branch information
Showing
7 changed files
with
197 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Android PR Builder | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
name: CD Release Builder | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: show github pull request | ||
run: echo ${{ github.event.pull_request.title }} | ||
|
||
- name: Gradle cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Create Google-Services.json | ||
env: | ||
GOOGLE_SERVICES_ALPHA: ${{ secrets.GOOGLE_SERVICES_ALPHA }} | ||
GOOGLE_SERVICES_BETA: ${{ secrets.GOOGLE_SERVICES_BETA }} | ||
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} | ||
run: | | ||
touch ./app/src/debug/google-services.json | ||
touch ./app/src/alpha/google-services.json | ||
touch ./app/src/beta/google-services.json | ||
mkdir ./app/src/release | ||
touch ./app/src/release/google-services.json | ||
echo $GOOGLE_SERVICES_ALPHA >> ./app/src/debug/google-services.json | ||
echo $GOOGLE_SERVICES_ALPHA >> ./app/src/alpha/google-services.json | ||
echo $GOOGLE_SERVICES_BETA >> ./app/src/beta/google-services.json | ||
echo $GOOGLE_SERVICES >> ./app/src/release/google-services.json | ||
cat ./app/src/debug/google-services.json | ||
working-directory: android | ||
|
||
- name: Create Local Properties | ||
run: touch local.properties | ||
working-directory: android | ||
|
||
- name: Access Local Properties | ||
env: | ||
POKE_BASE_URL: ${{ secrets.POKE_BASE_URL }} | ||
# POKE_DEV_BASE_URL: ${{ secrets.HOST_RELEASE_URI }} | ||
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | ||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
run: | | ||
echo POKE_BASE_URL=\"${{ secrets.POKE_BASE_URL }}\" >> local.properties | ||
echo STORE_PASSWORD= $STORE_PASSWORD >> local.properties | ||
echo KEY_PASSWORD= $KEY_PASSWORD >> local.properties | ||
echo KEY_ALIAS= $KEY_ALIAS >> local.properties | ||
working-directory: android | ||
|
||
- name: Create RELEASE Key Store | ||
env: | ||
KEY_STORE: ${{secrets.RELEASE_KEY_STORE}} | ||
run: | | ||
touch ./keystore/poke_key.jks | ||
echo "$KEY_STORE" | base64 -d > ./keystore/poke_key.jks | ||
working-directory: android | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
working-directory: android | ||
|
||
- name: Build Release APK | ||
run: ./gradlew assembleRelease | ||
working-directory: android | ||
|
||
- name: Upload Release Build to Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: release-artifacts | ||
path: android/app/build/outputs/apk/release/ | ||
if-no-files-found: error | ||
|
||
- name: Create Github Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
generate_release_notes: true | ||
files: | | ||
android/app/build/outputs/apk/release/app-release.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Android PR Builder | ||
|
||
on: | ||
push: | ||
branches: [ "an/release*" ] | ||
jobs: | ||
build: | ||
name: CI Release Builder | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Gradle cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Create Google-Services.json | ||
env: | ||
GOOGLE_SERVICES_ALPHA: ${{ secrets.GOOGLE_SERVICES_ALPHA }} | ||
GOOGLE_SERVICES_BETA: ${{ secrets.GOOGLE_SERVICES_BETA }} | ||
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} | ||
run: | | ||
touch ./app/src/debug/google-services.json | ||
touch ./app/src/alpha/google-services.json | ||
touch ./app/src/beta/google-services.json | ||
mkdir ./app/src/release | ||
touch ./app/src/release/google-services.json | ||
echo $GOOGLE_SERVICES_ALPHA >> ./app/src/debug/google-services.json | ||
echo $GOOGLE_SERVICES_ALPHA >> ./app/src/alpha/google-services.json | ||
echo $GOOGLE_SERVICES_BETA >> ./app/src/beta/google-services.json | ||
echo $GOOGLE_SERVICES >> ./app/src/release/google-services.json | ||
cat ./app/src/debug/google-services.json | ||
working-directory: android | ||
|
||
- name: Create Local Properties | ||
run: touch local.properties | ||
working-directory: android | ||
|
||
- name: Access Local Properties | ||
env: | ||
POKE_BASE_URL: ${{ secrets.POKE_BASE_URL }} | ||
# POKE_DEV_BASE_URL: ${{ secrets.HOST_RELEASE_URI }} | ||
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | ||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | ||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | ||
run: | | ||
echo POKE_BASE_URL=\"${{ secrets.POKE_BASE_URL }}\" >> local.properties | ||
echo STORE_PASSWORD= $STORE_PASSWORD >> local.properties | ||
echo KEY_PASSWORD= $KEY_PASSWORD >> local.properties | ||
echo KEY_ALIAS= $KEY_ALIAS >> local.properties | ||
working-directory: android | ||
|
||
- name: Create RELEASE Key Store | ||
env: | ||
KEY_STORE: ${{secrets.RELEASE_KEY_STORE}} | ||
run: | | ||
touch ./keystore/poke_key.jks | ||
echo "$KEY_STORE" | base64 -d > ./keystore/poke_key.jks | ||
working-directory: android | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
working-directory: android | ||
|
||
- name: KT Lint | ||
run: ./gradlew ktlintCheck | ||
working-directory: android | ||
|
||
- name: Unit Test Release | ||
run: ./gradlew testReleaseUnitTest | ||
working-directory: android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters