From 51efed0eeea2afda8bea679c7b4275bf40b0524e Mon Sep 17 00:00:00 2001 From: Carvin Yu <46855952+Carvin-Yu@users.noreply.github.com> Date: Sun, 7 Jan 2024 17:16:03 +0800 Subject: [PATCH] Update cd.yaml --- .github/workflows/cd.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 919f51a..505ccd0 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -26,11 +26,13 @@ jobs: version: ${{ steps.create_version.outputs.tag_name }} # 版本号 body: ${{ steps.create_version.outputs.body }} # 版本变更内容 steps: - - name: 生成版本号 - id: tag_name - uses: mathieudutour/github-tag-action@v6.1 + - uses: release-drafter/release-drafter@v5 + id: create_version with: - github_token: ${{ secrets.TOKEN_GITHUB }} + config-name: release-drafter.yml # 配置文件在 .github/release-drafter.yml + disable-autolabeler: true # 禁止自动标签 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: 查看变量 run: | echo ${{ format('version={0}', steps.create_version.outputs.tag_name ) }} @@ -138,7 +140,7 @@ jobs: - name: 发布文件 uses: ncipollo/release-action@v1 with: - token: ${{ secrets.TOKEN_GITHUB }} + token: ${{ secrets.GITHUB_TOKEN }} allowUpdates: true # 覆盖文件 #draft: true # 草稿 自己可见 版本号会保持一样 默认是自动发布 latest #prerelease: true # 预发布 别人可以看到 版本号会继续加