From 1bff496c7f486411ec458afed7a251945a8be8e4 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 11 Jan 2021 11:49:05 +0800 Subject: [PATCH] chore: update ci.yml --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92d889cb..9fb161da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,14 +3,20 @@ on: push: branches: - master - tags: - - v1.* + jobs: build-deploy: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@master + - name: Look Changelog + uses: jaywcjlove/changelog-generator@v1.3.9 + with: + token: ${{ secrets.GITHUB_TOKEN }} + filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot) + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' + - name: Setup Node uses: actions/setup-node@v1 with: @@ -25,6 +31,39 @@ jobs: - run: npm install - run: npm run build + + - name: Create Tag + id: create_tag + uses: jaywcjlove/create-tag-action@v1.1.5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + package-path: ./package.json + + - name: Generate Changelog + id: changelog + uses: jaywcjlove/changelog-generator@v1.3.9 + if: steps.create_tag.outputs.successful + with: + token: ${{ secrets.GITHUB_TOKEN }} + head-ref: ${{steps.create_tag.outputs.version}} + filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot) + filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' + + - name: Create Release + id: create_release + uses: actions/create-release@latest + if: steps.create_tag.outputs.successful + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.create_tag.outputs.version }} + release_name: ${{ steps.create_tag.outputs.version }} + body: | + ${{ steps.changelog.outputs.compareurl }} + ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: false + - run: npm run doc env: NODE_OPTIONS: --max_old_space_size=8192