From 188d6befb046f64af29d368df714d82b81a457f6 Mon Sep 17 00:00:00 2001 From: Orchard Date: Sun, 10 Dec 2023 22:53:09 +0800 Subject: [PATCH] ci: dingtalk notify test --- .github/workflows/dingtalk-noytify.yml | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/dingtalk-noytify.yml diff --git a/.github/workflows/dingtalk-noytify.yml b/.github/workflows/dingtalk-noytify.yml new file mode 100644 index 0000000..13f45ca --- /dev/null +++ b/.github/workflows/dingtalk-noytify.yml @@ -0,0 +1,34 @@ +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 + } + } \ No newline at end of file