7575 - name : Generate Release Notes
7676 id : release-notes
7777 run : |
78- RELEASE_NOTES=$(git log --pretty=format:"%h %s" -n 10 | tr '\n' ' ')
79- echo "RELEASE_NOTES=$RELEASE_NOTES" >> $GITHUB_ENV
78+ CURRENT_RELEASE_BRANCH=${GITHUB_REF#refs/heads/}
79+ echo "Current release branch: ${CURRENT_RELEASE_BRANCH}"
80+
81+ git fetch --all
82+
83+ LAST_RELEASE_BRANCH=$(git for-each-ref --sort=-committerdate --format '%(refname:short)' refs/remotes/origin/release/ | grep -v "^origin/${CURRENT_RELEASE_BRANCH}$" | head -n 1)
84+
85+ if [ -z "$LAST_RELEASE_BRANCH" ]; then
86+ echo "No previous release branch found. Using the first commit as baseline."
87+ LAST_RELEASE_BRANCH=$(git rev-list --max-parents=0 HEAD)
88+ fi
89+ echo "Using last release branch: ${LAST_RELEASE_BRANCH}"
90+
91+ RELEASE_NOTES=$(git log ${LAST_RELEASE_BRANCH}..HEAD --pretty=format:"%h %s" | tr '\n' ' ')
92+ echo "RELEASE_NOTES=${RELEASE_NOTES}" >> $GITHUB_ENV
8093
8194 - name : Upload to Firebase App Distribution
8295 uses : wzieba/Firebase-Distribution-Github-Action@v1
@@ -96,11 +109,4 @@ jobs:
96109 - name : Send Slack Notification
97110 if : success()
98111 run : |
99- curl -X POST -H 'Content-type: application/json' --data '{
100- "text": "🎉 *Firebase 릴리즈 완료!* 🎉\n
101- 🚀 *배포 버전:* `${{ env.VERSION_NAME }} (버전 코드: ${{ env.VERSION_CODE }})`\n
102- 📌 *배포 브랜치:* `${{ github.ref_name }}`\n
103- 🔖 *릴리즈 노트:*\n
104- ```${{ env.RELEASE_NOTES }}```\n
105- 📥 *다운로드 링크:* <${{ steps.firebase_upload.outputs.TESTING_URI }}|여기를 클릭>"
106- }' ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
112+ 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 }}
0 commit comments