Skip to content

release.yml 업데이트 #8

release.yml 업데이트

release.yml 업데이트 #8

Workflow file for this run

name: Release Firebase Distribution Workflow
on:
push:
branches:
- release/**
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build APK
run: ./gradlew assembleRelease
- name: Verify APK Existence
run: test -f app/build/outputs/apk/release/app-release.apk
- name: Extract Version Information
id: version-info
run: |
VERSION_NAME=$(grep 'versionName =' app/build.gradle.kts | sed -E 's/[^0-9.]//g')
VERSION_CODE=$(grep 'versionCode =' app/build.gradle.kts | sed -E 's/[^0-9]//g')
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
- name: Upload to Firebase App Distribution
id: firebase_upload
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
groups: hmh-team
file: app/build/outputs/apk/release/app-release.apk
releaseNotes: "New version uploaded via GitHub Actions"
- name: Get Firebase Download URL (Debug)
run: |
echo "Firebase Console URL: ${{ steps.firebase_upload.outputs.FIREBASE_CONSOLE_URI }}"
echo "Tester Download URL: ${{ steps.firebase_upload.outputs.TESTING_URI }}"
echo "Binary Download URL: ${{ steps.firebase_upload.outputs.BINARY_DOWNLOAD_URI }}"
- name: Send Slack Notification
if: success()
run: |
curl -X POST -H 'Content-type: application/json' --data '{
"text": "🎉 *Firebase 릴리즈 완료!* 🎉\n
🚀 *배포 버전:* `${{ env.VERSION_NAME }} (버전 코드: ${{ env.VERSION_CODE }})`\n
📌 *배포 브랜치:* `${{ github.ref_name }}`\n
🔖 *릴리즈 노트:*\n
```${{ env.RELEASE_NOTES }}```\n
📥 *다운로드 링크:* <${{ steps.firebase_upload.outputs.TESTING_URI }}|여기를 클릭>"
}' ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}