Skip to content

Commit

Permalink
chore: 使用 notify-dingtalk 发布钉钉群公告
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Mar 29, 2021
1 parent 5508494 commit f880d3d
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 78 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
key: ${{ hashFiles('yarn.lock') }}
- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: npx yarn
- run: |
npm test
npx ts-node -T ./scripts/notifyDingtalk.ts
- run: npx notify-dingtalk
env:
D_ACCESS_TOKEN: ${{ secrets.D_ACCESS_TOKEN }}
D_SECRET: ${{ secrets.D_SECRET }}
20 changes: 20 additions & 0 deletions notify-dingtalk.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const {
defineConfig,
getLatestConventionalChangelog,
} = require('notify-dingtalk')
const { dedent } = require('vtils')

module.exports = defineConfig({
title: '发布公告',
content: dedent`
# 发布公告
---
${getLatestConventionalChangelog('./CHANGELOG.md')}
---
[进入主页→](https://github.com/fjc0k/yapi-to-typescript)
`,
})
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"husky": "^4",
"jest": "^26",
"lint-staged": "^10",
"notify-dingtalk": "^1.2.0",
"openapi-types": "^7.0.1",
"shx": "^0.3.2",
"standard-version": "^4.4.0",
Expand Down
68 changes: 0 additions & 68 deletions scripts/notifyDingtalk.ts

This file was deleted.

Loading

0 comments on commit f880d3d

Please sign in to comment.