diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml deleted file mode 100644 index fc98e2c0e9..0000000000 --- a/.github/workflows/auto-release.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: 🚀 Auto Release -on: - push: - branches: - - master - -jobs: - release: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci skip]') && startsWith(github.event.head_commit.message , 'chore(release):')" # commit 记录带 'chore(release):' 关键词 - - steps: - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: 16 # semantic-release 需要 >= 16 的 Node.js 环境 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install dependencies - run: yarn - - - name: Build - run: yarn build - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: yarn release - - # G2 栈技术交流群 - - name: Release success ding talk official group notify - if: ${{ success() }} - uses: visiky/dingtalk-release-notify@main - with: - DING_TALK_TOKEN: ${{ secrets.DING_TALK_TOKENS}} - notify_title: '🎉 G2Plot 发布 release {release_tag} 🎉' - notify_body: '## { title }
![](https://gw.alipayobjects.com/zos/antfincdn/AdgOtrq%26KF/G2Plot.png)
{ body }
' - notify_footer: '> 前往 [**G2Plot Releases**]({ release_url }) 查看完整信息.' - at_all: true - - # 发布失败推送通知内部开发群 - - name: Release failed ding talk dev group notify - if: ${{ failure() }} - uses: zcong1993/actions-ding@master - with: - dingToken: ${{ secrets.DEV_GROUP_DING_TOKEN }} - body: | - { - "msgtype": "link", - "link": { - "title": "🚨 G2Plot 自动发布失败", - "text": "🔗 请点击链接查看具体原因, 及时修复 🚑", - "messageUrl": "https://github.com/antvis/G2Plot/actions/workflows/auto-release.yml", - "picUrl": "https://gw.alipayobjects.com/zos/antfincdn/AdgOtrq%26KF/G2Plot.png" - } - } \ No newline at end of file diff --git a/.github/workflows/release-notify.yml b/.github/workflows/release-notify.yml new file mode 100644 index 0000000000..a2722213c8 --- /dev/null +++ b/.github/workflows/release-notify.yml @@ -0,0 +1,18 @@ +name: DingTalk Release Notify + +on: + workflow_dispatch: + release: + types: [published, edited] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - uses: visiky/dingtalk-release-notify@main + with: + DING_TALK_TOKEN: ${{ secrets.DING_TALK_TOKENS}} + notify_title: '🎉 G2Plot 发布 release {release_tag} 🎉' + notify_body: '## { title }
![](https://gw.alipayobjects.com/zos/antfincdn/AdgOtrq%26KF/G2Plot.png)
{ body }
' + notify_footer: '> 前往 [**G2Plot Releases**]({ release_url }) 查看完整信息.' + at_all: false diff --git a/.releaserc.js b/.releaserc.js deleted file mode 100644 index 3648f98cae..0000000000 --- a/.releaserc.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = { - branch: 'master', - plugins: [ - '@semantic-release/commit-analyzer', - '@semantic-release/release-notes-generator', - '@semantic-release/changelog', - [ - '@semantic-release/git', - { - message: 'chore(release): 🤖 ${nextRelease.version} [ci skip]', - }, - ], - '@semantic-release/npm', - '@semantic-release/github', - ], - preset: 'angular', -}; diff --git a/package.json b/package.json index fa78ed32cd..fd190bf0b1 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ }, "scripts": { "start": "npm run site:clean && npm run site:develop", - "release": "semantic-release", "site:develop": "cross-env PORT=8080 gatsby develop --open -H 0.0.0.0", "site:build": "NODE_OPTIONS=--max_old_space_size=8192 npm run site:clean && gatsby build --prefix-paths", "site:clean": "gatsby clean", @@ -74,8 +73,6 @@ "@babel/runtime": "^7.11.2", "@commitlint/cli": "^8.2.0", "@commitlint/config-angular": "^8.2.0", - "@semantic-release/changelog": "^6.0.1", - "@semantic-release/git": "^10.0.1", "@types/jest": "^25.2.1", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", @@ -107,7 +104,6 @@ "react-dom": "^16.11.0", "react-i18next": "^11.7.0", "rimraf": "^3.0.0", - "semantic-release": "^18.0.0", "ts-jest": "^25.4.0", "ts-loader": "^7.0.0", "typescript": "^3.5.3",