ci: dingtalk notify test #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DingTalk Notify | |
on: | |
workflow_dispatch: # manual trigger workflow to nofify | |
push: | |
branches: | |
- test-dingtalk-notify | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Setup Environment | |
run: node -e "console.log('PACKAGE_VERSION=' + require('./package.json').version + '\nPACKAGE_NAME=' + require('./package.json').name + '-' + require('./package.json').version)" >> $GITHUB_ENV # set PACKAGE_VERSION and PACKAGE_NAME | |
- name: Notify | |
uses: zcong1993/actions-ding@master | |
with: | |
dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN}} | |
body: | | |
{ | |
"msgtype": "markdown", | |
"markdown": { | |
"title":"🎉 (Test) TSwagger Published 🎉", | |
"text": "### vscode-tswagger \n\ntswagger`v${{ env.PACKAGE_VERSION }}` had been published. These are the changes:\n\n${{ steps.changelog.outputs.changes }}" | |
}, | |
"at": { | |
"isAtAll": false | |
} | |
} |