Skip to content

Update deploy.yml #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 33 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,38 @@ jobs:
uses: actions/deploy-pages@v4


announcement:
name: 📣 Announcement
telegram-announcement:
name: 📣 Announcement on Telegram
needs: build
uses: ./.github/workflows/announcement.yml
with:
pr_title: ${{ github.event.head_commit.message }}
pr_number: ${{ needs.changesets.outputs.pr }}
pr_url:
https://github.com/${{ github.repository }}/pull/${{
needs.changesets.outputs.pr }}
pr_body: |
${{ github.event.head_commit.message }}
secrets:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
runs-on: ubuntu-latest
steps:
- name: 📦 Extract released packages
id: extract
run: |
REPO="https://github.com/${{ github.repository }}"
echo "${{ github.event.pull_request.body }}" > pr_body.md
# Extract all lines starting with '## '
grep '^## ' pr_body.md | sed 's/^## //' > packages.txt
# Generate HTML list of links to releases
while read -r line; do
ENCODED_TAG=$(echo "$line" | jq -sRr @uri) # encode the tag for URL safety
echo " • <a href=\"$REPO/releases/tag/$ENCODED_TAG\">$line</a>"
done < packages.txt > release_links.html
{
echo "RELEASE_LINKS<<EOF"
cat release_links.html
echo "EOF"
} >> "$GITHUB_ENV"

- name: 💬 Send Telegram Message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: html
message: |
🚀 <b><a href="https://github.com/${{ github.repository }}">${{ github.repository }}</a></b> was just released!
${{ env.RELEASE_LINKS }}

🔗 PR: <a href="${{ github.event.pull_request.html_url }}"><b>${{ github.event.pull_request.title }}</b>#${{ github.event.pull_request.number }}</a>