Skip to content

Commit f0e0c84

Browse files
authored
Update deploy.yml
1 parent 874e712 commit f0e0c84

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,28 @@ jobs:
3030
with:
3131
fetch-depth: 0
3232

33-
- name: send telegram message on push
33+
- name: Extract PR Description
34+
id: extract
35+
run: |
36+
BODY="${{ github.event.pull_request.body }}"
37+
# Extract from '# Releases' onward
38+
RELEASE_NOTES=$(echo "$BODY" | awk '/^# Releases/{flag=1} flag')
39+
# Save it to an environment variable
40+
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
41+
echo "$RELEASE_NOTES" >> $GITHUB_ENV
42+
echo "EOF" >> $GITHUB_ENV
43+
44+
- name: Send Telegram Message
3445
uses: appleboy/telegram-action@master
3546
with:
3647
to: ${{ secrets.TELEGRAM_TO }}
3748
token: ${{ secrets.TELEGRAM_TOKEN }}
3849
message: |
39-
${{ github.actor }} created commit:
40-
Commit message: ${{ github.event.commits[0].message }}
41-
42-
Repository: ${{ github.repository }}
43-
44-
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
50+
🚀 New Changeset PR Created
51+
🔗 PR: ${{ github.event.pull_request.html_url }}
52+
👤 Author: ${{ github.actor }}
53+
📦 Release Notes:
54+
${{ env.RELEASE_NOTES }}
4555
4656
- name: "🔧 setup pnpm"
4757
uses: pnpm/action-setup@v3

0 commit comments

Comments
 (0)