Skip to content

Commit

Permalink
Update cd.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Carvin-Yu authored Jan 7, 2024
1 parent 81c2ecc commit 51efed0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
- 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 ) }}
Expand Down Expand Up @@ -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 # 预发布 别人可以看到 版本号会继续加
Expand Down

0 comments on commit 51efed0

Please sign in to comment.