File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212
1313 steps :
14+ - name : Extract released packages
15+ id : extract
16+ run : |
17+ REPO="https://github.com/${{ github.repository }}"
18+ echo "${{ github.event.pull_request.body }}" > pr_body.md
19+
20+ # Extract all lines starting with '## '
21+ grep '^## ' pr_body.md | sed 's/^## //' > packages.txt
22+
23+ # Generate HTML list of links to releases
24+ while read -r line; do
25+ ENCODED_TAG=$(echo "$line" | jq -sRr @uri) # encode the tag for URL safety
26+ echo "• <a href=\"$REPO/releases/tag/$ENCODED_TAG\">$line</a>"
27+ done < packages.txt > release_links.html
28+
29+ {
30+ echo "RELEASE_LINKS<<EOF"
31+ cat release_links.html
32+ echo "EOF"
33+ } >> "$GITHUB_ENV"
34+
1435 - name : Send Telegram Message
1536 uses : appleboy/telegram-action@master
1637 with :
2041 message : |
2142 🚀 <b>New Release for <a href="https://github.com/${{ github.repository }}">Design System</a>!</b>\n
2243 🔗 <a href="${{ github.event.pull_request.html_url }}">View PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}</a>\n
23- 📦 <a href="https://github.com/${{ github.repository }}/releases">Releases</a>
44+ 📦 <b>Released Packages:</b>\n
45+ ${{ env.RELEASE_LINKS }}
You can’t perform that action at this time.
0 commit comments