File tree Expand file tree Collapse file tree 2 files changed +36
-13
lines changed Expand file tree Collapse file tree 2 files changed +36
-13
lines changed Original file line number Diff line number Diff line change 1- name : Notify Telegram on Release Merge
1+ name : 📣 Announcement
22
33on :
4- pull_request :
5- types : [closed]
6- branches : [main]
4+ workflow_call :
5+ inputs :
6+ pr_title :
7+ required : true
8+ type : string
9+ pr_number :
10+ required : true
11+ type : string
12+ pr_url :
13+ required : true
14+ type : string
15+ pr_body :
16+ required : true
17+ type : string
718
819jobs :
9- telegram :
10- if : github.event.pull_request.merged == true
20+ telegram-announcement :
1121 runs-on : ubuntu-latest
1222
1323 steps :
1424 - name : Extract released packages
1525 id : extract
1626 run : |
1727 REPO="https://github.com/${{ github.repository }}"
18- echo "${{ github.event.pull_request.body }}" > pr_body.md
28+ echo "${{ inputs.pr_body }}" > pr_body.md
1929
2030 # Extract all lines starting with '## '
2131 grep '^## ' pr_body.md | sed 's/^## //' > packages.txt
3141 cat release_links.html
3242 echo "EOF"
3343 } >> "$GITHUB_ENV"
34-
3544
3645 - name : Send Telegram Message
3746 uses : appleboy/telegram-action@master
4150 format : html
4251 message : |
4352 🚀 <b><a href="https://github.com/${{ github.repository }}">${{ github.repository }}</a></b> was just released!
53+
54+ 📦 <b>Released Packages:</b>
4455 ${{ env.RELEASE_LINKS }}
45-
46- 🔗 PR: <a href="${{ github.event.pull_request.html_url }}"><b>${{ github.event.pull_request.title }}</b>#${{ github.event.pull_request.number }}</a>
47-
48-
49-
56+
57+ 🔗 PR: <a href="${{ inputs.pr_url }}"><b>${{ inputs.pr_title }}</b> #${{ inputs.pr_number }}</a>
Original file line number Diff line number Diff line change 7474 - name : " 🚀 deploy to github pages"
7575 id : deployment
7676 uses : actions/deploy-pages@v4
77+
78+
79+ announcement :
80+ name : 📣 Announcement
81+ needs : build
82+ uses : ./.github/workflows/announcement.yml
83+ with :
84+ pr_title : ${{ github.event.head_commit.message }}
85+ pr_number : ${{ needs.changesets.outputs.pr }}
86+ pr_url :
87+ https://github.com/${{ github.repository }}/pull/${{
88+ needs.changesets.outputs.pr }}
89+ pr_body : |
90+ ${{ github.event.head_commit.message }}
91+
You can’t perform that action at this time.
0 commit comments