From 9d2474446d8d19ed1b005e3ee726611b7d8a4943 Mon Sep 17 00:00:00 2001 From: Amirhossein Alibakhshi Date: Tue, 6 May 2025 19:59:21 +0330 Subject: [PATCH 1/2] Update announcement.yml --- .github/workflows/announcement.yml | 34 ++++++++++++++++++------------ 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/announcement.yml b/.github/workflows/announcement.yml index c79a3c8..a3fee22 100644 --- a/.github/workflows/announcement.yml +++ b/.github/workflows/announcement.yml @@ -1,13 +1,23 @@ -name: Notify Telegram on Release Merge +name: 📣 Announcement on: - pull_request: - types: [closed] - branches: [main] + workflow_call: + inputs: + pr_title: + required: true + type: string + pr_number: + required: true + type: string + pr_url: + required: true + type: string + pr_body: + required: true + type: string jobs: - telegram: - if: github.event.pull_request.merged == true + telegram-announcement: runs-on: ubuntu-latest steps: @@ -15,7 +25,7 @@ jobs: id: extract run: | REPO="https://github.com/${{ github.repository }}" - echo "${{ github.event.pull_request.body }}" > pr_body.md + echo "${{ inputs.pr_body }}" > pr_body.md # Extract all lines starting with '## ' grep '^## ' pr_body.md | sed 's/^## //' > packages.txt @@ -31,7 +41,6 @@ jobs: cat release_links.html echo "EOF" } >> "$GITHUB_ENV" - - name: Send Telegram Message uses: appleboy/telegram-action@master @@ -41,9 +50,8 @@ jobs: format: html message: | 🚀 ${{ github.repository }} was just released! + + 📦 Released Packages: ${{ env.RELEASE_LINKS }} - - 🔗 PR: ${{ github.event.pull_request.title }}#${{ github.event.pull_request.number }} - - - + + 🔗 PR: ${{ inputs.pr_title }} #${{ inputs.pr_number }} From 4f59a1eb20c91163eeceab075564a1681d0057bc Mon Sep 17 00:00:00 2001 From: Amirhossein Alibakhshi Date: Tue, 6 May 2025 20:00:57 +0330 Subject: [PATCH 2/2] Update deploy.yml --- .github/workflows/deploy.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e8b90a7..a88d84b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -74,3 +74,18 @@ jobs: - name: "🚀 deploy to github pages" id: deployment uses: actions/deploy-pages@v4 + + + announcement: + name: 📣 Announcement + 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 }} +