Skip to content

Commit 7a431b3

Browse files
committed
feature[release]: fix release workflows
1 parent e018d3f commit 7a431b3

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,43 @@ jobs:
7373
file: app/build/outputs/apk/release/app-release.apk
7474
releaseNotes: ${{ env.RELEASE_NOTES }}
7575

76+
- name: Install Firebase CLI
77+
run: curl -sL https://firebase.tools | bash
78+
79+
- name: Get Firebase Download URL
80+
id: firebase-url
81+
run: |
82+
DOWNLOAD_URL=$(firebase appdistribution:releases:list --app ${{ secrets.FIREBASE_APP_ID }} --limit 1 --format json | jq -r '.[0].downloadUrl')
83+
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV
84+
85+
- name: Find Latest Release Branch
86+
id: previous-release
87+
run: |
88+
PREV_RELEASE_BRANCH=$(git branch -r --sort=-committerdate | grep 'origin/release/' | grep -v ${{ github.ref_name }} | head -n 1 | sed 's/origin\///')
89+
echo "PREV_RELEASE_BRANCH=$PREV_RELEASE_BRANCH" >> $GITHUB_ENV
90+
91+
- name: Generate Release Notes
92+
id: release-notes
93+
run: |
94+
RELEASE_NOTES=$(git log ${{ env.PREV_RELEASE_BRANCH }}..HEAD --oneline)
95+
echo "RELEASE_NOTES=$RELEASE_NOTES" >> $GITHUB_ENV
96+
97+
- name: Extract Version Information
98+
id: version-info
99+
run: |
100+
VERSION_NAME=$(grep 'versionName' app/build.gradle.kts | awk '{print $2}' | tr -d '"')
101+
VERSION_CODE=$(grep 'versionCode' app/build.gradle.kts | awk '{print $2}')
102+
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
103+
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
104+
76105
- name: Send Slack Notification
77106
if: success()
78107
run: |
79108
curl -X POST -H 'Content-type: application/json' --data '{
80109
"text": "🎉 *Firebase 릴리즈 완료!* 🎉\n
110+
🚀 *배포 버전:* `${{ env.VERSION_NAME }} (버전 코드: ${{ env.VERSION_CODE }})`\n
81111
📌 *배포 브랜치:* `${{ github.ref_name }}`\n
82112
🔖 *릴리즈 노트:*\n
83113
```${{ env.RELEASE_NOTES }}```\n
84-
🔍 *커밋 SHA:* `${{ github.sha }}`\n
85114
📥 *다운로드 링크:* <${{ env.DOWNLOAD_URL }}|여기를 클릭>"
86-
}' ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
115+
}' ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)