Skip to content

Commit

Permalink
发布改进action的流程加入升级信息
Browse files Browse the repository at this point in the history
  • Loading branch information
duolabmeng6 committed Nov 6, 2023
1 parent c254bdd commit b0cf17f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 323 deletions.
7 changes: 7 additions & 0 deletions .github/releasesText.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# GoEasyDesigner 窗口设计师

奋斗了{{用了多少时间}},本次更新内容如下:

{{最新发布信息}}

{{变更内容}}
50 changes: 22 additions & 28 deletions .github/workflows/发布软件.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,39 @@ jobs:
name: 构建版本号和变更信息
runs-on: ubuntu-latest
outputs:
version: ${{ steps.create_version.outputs.tag_name }} # 版本号
body: ${{ steps.mmp.outputs.body }} # 版本变更内容
version: ${{ steps.create_version.outputs.NewVersion }} # 版本号
body: ${{ steps.create_body.outputs.Body }} # 版本变更内容
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: 检查是否 "发布"
run: |
echo "New Body: ${{ steps.jobs_v.outputs.newBody }}"
latest_commit_message=$(git log -1 --pretty=%B)
if [[ $latest_commit_message == *"发布"* ]]; then
echo "找到发布关键字继续工作流"
else
echo "没有找到发布关键字停止工作流"
exit 1 # 停止工作流程
fi
- uses: release-drafter/release-drafter@v5
- name: 递增版本号
id: create_version
uses: duolabmeng6/action-autotag-python@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 获取更新日志
id: create_body
uses: duolabmeng6/action-Releases-log@main
with:
config-name: release-drafter.yml # 配置文件在 .github/release-drafter.yml
disable-autolabeler: false # 禁止自动标签
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: 查看变量
FILE: .github/releasesText.md
KEYS: bug,改进,优化,新增,删除
- name: 查看版本号和更新日志
run: |
echo ${{ format('version={0}', steps.create_version.outputs.tag_name ) }}
echo ${{ format('version={0}', steps.create_version.outputs.NewVersion ) }}
echo "${{ steps.create_body.outputs.Body }}"
jobs_macos:
# 暂停
#if: false
Expand All @@ -54,8 +58,7 @@ jobs:
runs-on: macos-12
env:
version: ${{ needs.jobs_v.outputs.version }}
body: ${{ needs.jobs_v.outputs.body }}
newBody: ${{ needs.jobs_v.outputs.newBody }}
body: ${{ needs.jobs_v.outputs.Body }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -71,7 +74,7 @@ jobs:
run: |
pwd
ls -la
echo "New Body: ${{ env.newBody }}"
echo "New Body: ${{ env.body }}"
- name: 安装 go
uses: actions/setup-go@v4
Expand Down Expand Up @@ -125,8 +128,7 @@ jobs:
runs-on: windows-2022
env:
version: ${{ needs.jobs_v.outputs.version }}
body: ${{ needs.jobs_v.outputs.body }}
newBody: ${{ needs.jobs_v.outputs.newBody }}
body: ${{ needs.jobs_v.outputs.Body }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -183,8 +185,7 @@ jobs:
runs-on: ubuntu-latest
env:
version: ${{ needs.jobs_v.outputs.version }}
body: ${{ needs.jobs_v.outputs.body }}
newBody: ${{ needs.jobs_v.outputs.newBody }}
body: ${{ needs.jobs_v.outputs.Body }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -200,13 +201,6 @@ jobs:
echo ${{ format('version {0}', env.version ) }}
echo ${{steps.download.outputs.download-path}}
ls -R
- name: 检查是否 "发布"
run: |
cd ./citool/gitLogSum/
chmod 777 ./gitLogSum
./gitLogSum > updateLog.md
cat updateLog.md
- name: 发布文件
uses: ncipollo/release-action@v1
with:
Expand All @@ -215,6 +209,6 @@ jobs:
#draft: true # 草稿 自己可见 版本号会保持一样 默认是自动发布 latest
#prerelease: true # 预发布 别人可以看到 版本号会继续加
tag: ${{ env.version }} # 版本号 v0.1.0
bodyFile: './citool/gitLogSum/updateLog.md'
body: ${{ env.body }}
artifacts: "macos/*.zip,macos/*.dmg,window/*.exe,window/*.zip"

1 change: 0 additions & 1 deletion citool/gitLogSum/build.sh

This file was deleted.

Binary file removed citool/gitLogSum/gitLogSum
Binary file not shown.
170 changes: 0 additions & 170 deletions citool/gitLogSum/gitLogSum.go

This file was deleted.

18 changes: 0 additions & 18 deletions citool/gitLogSum/go.mod

This file was deleted.

Loading

0 comments on commit b0cf17f

Please sign in to comment.