|
29 | 29 | uses: actions/checkout@v4 |
30 | 30 | with: |
31 | 31 | fetch-depth: 0 |
| 32 | + |
| 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 |
| 45 | + uses: appleboy/telegram-action@master |
| 46 | + with: |
| 47 | + to: ${{ secrets.TELEGRAM_TO }} |
| 48 | + token: ${{ secrets.TELEGRAM_TOKEN }} |
| 49 | + message: | |
| 50 | + 🚀 New Changeset PR Created |
| 51 | + 🔗 PR: ${{ github.event.pull_request.html_url }} |
| 52 | + 👤 Author: ${{ github.actor }} |
| 53 | + 📦 Release Notes: |
| 54 | + ${{ env.RELEASE_NOTES }} |
32 | 55 |
|
33 | 56 | - name: "🔧 setup pnpm" |
34 | 57 | uses: pnpm/action-setup@v3 |
|
59 | 82 | with: |
60 | 83 | path: .vitepress/dist |
61 | 84 |
|
62 | | - - name: send telegram message on push |
63 | | - uses: appleboy/telegram-action@master |
64 | | - with: |
65 | | - to: ${{ secrets.TELEGRAM_TO }} |
66 | | - token: ${{ secrets.TELEGRAM_TOKEN }} |
67 | | - message: | |
68 | | - ${{ github.actor }} created commit: |
69 | | - Commit message: ${{ github.event.commits[0].message }} |
70 | | - |
71 | | - Repository: ${{ github.repository }} |
72 | | - |
73 | | - See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} |
74 | 85 |
|
75 | 86 | deploy: |
76 | 87 | environment: |
|
0 commit comments