Skip to content

Commit 9c60c5b

Browse files
authored
release.yml 업데이트
1 parent a7162bd commit 9c60c5b

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,46 @@ jobs:
2222
- name: Grant execute permission for gradlew
2323
run: chmod +x ./gradlew
2424

25+
- name: Create local.properties
26+
run: |
27+
echo "kakaoApiKey=${{ secrets.KAKAO_API_KEY }}" > local.properties
28+
echo "amplitudeApiKey=${{ secrets.AMPLITUDE_API_KEY }}" >> local.properties
29+
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> local.properties
30+
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> local.properties
31+
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> local.properties
32+
echo "hmhDevBaseUrl=${{ secrets.HMH_DEV_BASE_URL }}" >> local.properties
33+
echo "hmhProdBaseUrl=${{ secrets.HMH_PROD_BASE_URL }}" >> local.properties
34+
35+
- name: Setup Firebase Service Account
36+
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
37+
38+
- name: Cache Gradle dependencies
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.gradle/caches
42+
key: gradle-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
43+
restore-keys: |
44+
gradle-cache-${{ runner.os }}-
45+
46+
- name: Extract Version Information
47+
id: version-info
48+
run: |
49+
VERSION_INFO=$(./gradlew -q printVersionInfo)
50+
echo "$VERSION_INFO"
51+
echo "$VERSION_INFO" | grep 'VERSION_NAME' | cut -d'=' -f2 | tr -d '\r' >> $GITHUB_ENV
52+
echo "$VERSION_INFO" | grep 'VERSION_CODE' | cut -d'=' -f2 | tr -d '\r' >> $GITHUB_ENV
53+
2554
- name: Build APK
2655
run: ./gradlew assembleRelease
2756

2857
- name: Verify APK Existence
2958
run: test -f app/build/outputs/apk/release/app-release.apk
3059

31-
- name: Extract Version Information
32-
id: version-info
60+
- name: Generate Release Notes
61+
id: release-notes
3362
run: |
34-
VERSION_NAME=$(grep 'versionName =' app/build.gradle.kts | sed -E 's/[^0-9.]//g')
35-
VERSION_CODE=$(grep 'versionCode =' app/build.gradle.kts | sed -E 's/[^0-9]//g')
36-
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
37-
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
63+
RELEASE_NOTES=$(git log --pretty=format:"%h %s" -n 10 | tr '\n' ' ')
64+
echo "RELEASE_NOTES=$RELEASE_NOTES" >> $GITHUB_ENV
3865
3966
- name: Upload to Firebase App Distribution
4067
id: firebase_upload
@@ -44,7 +71,7 @@ jobs:
4471
serviceCredentialsFileContent: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
4572
groups: hmh-team
4673
file: app/build/outputs/apk/release/app-release.apk
47-
releaseNotes: "New version uploaded via GitHub Actions"
74+
releaseNotes: "${{ env.RELEASE_NOTES }}"
4875

4976
- name: Get Firebase Download URL (Debug)
5077
run: |

0 commit comments

Comments
 (0)