chore: tweet when release is published (#45526)

This commit is contained in:
afc163 2023-10-25 18:45:10 +08:00 committed by GitHub
parent 6a525ccbec
commit 15acef53d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 3 deletions

View File

@ -5,7 +5,7 @@
# 4. Then the new tag will trigger this current action
# 5. The action will generate a new release, and publish DingDing notification at the same time
name: Release Helper
name: DingTalk Release Notification
on:
create
@ -20,7 +20,7 @@ jobs:
if: github.event.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- name: release antd
- name: Send to Ant Design DingGroup
uses: actions-cool/release-helper@v2
with:
trigger: 'tag'
@ -36,7 +36,7 @@ jobs:
prettier: true
prerelease-filter: '-, a, b, A, B'
- name: notice bigfish
- name: Send to Bigfish DingGroup
uses: actions-cool/release-helper@v2
with:
trigger: 'tag'

22
.github/workflows/release-tweet.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: 🐦 Release to Tweet
on:
release:
types: [published]
permissions:
contents: read
jobs:
tweet:
runs-on: ubuntu-latest
steps:
- name: Tweet
uses: nearform-actions/github-action-notify-twitter@v1
with:
message: |
Ant Design (antd@${{ github.event.release.tag_name }}) has been released ~ 🎊🎊🎊 Check out the release notes: ${{ github.event.release.html_url }}
twitter-app-key: ${{ secrets.TWITTER_API_KEY }}
twitter-app-secret: ${{ secrets.TWITTER_API_SECRET_KEY }}
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}