Skip to content

Commit

Permalink
Release cd.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Carvin-Yu authored Jan 7, 2024
1 parent bc7c261 commit d2d9807
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 发布软件
name: 持续交付

on:
push: # 代码推送到main分支自动触发工作流
Expand All @@ -15,7 +15,6 @@ on:
- Release
- Release ann Deploy


permissions: write-all # 给所有工作写权限

jobs:
Expand All @@ -26,13 +25,11 @@ jobs:
version: ${{ steps.create_version.outputs.tag_name }} # 版本号
body: ${{ steps.create_version.outputs.body }} # 版本变更内容
steps:
- uses: release-drafter/release-drafter@v5
id: create_version
with:
config-name: release-drafter.yml # 配置文件在 .github/release-drafter.yml
disable-autolabeler: true # 禁止自动标签
- name: 生成版本号
id: tag_name
uses: mathieudutour/github-tag-action@v6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ env.TOKEN_GITHUB }}
- name: 查看变量
run: |
echo ${{ format('version={0}', steps.create_version.outputs.tag_name ) }}
Expand Down Expand Up @@ -140,7 +137,7 @@ jobs:
- name: 发布文件
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.TOKEN_GITHUB }}
allowUpdates: true # 覆盖文件
#draft: true # 草稿 自己可见 版本号会保持一样 默认是自动发布 latest
#prerelease: true # 预发布 别人可以看到 版本号会继续加
Expand Down

0 comments on commit d2d9807

Please sign in to comment.