mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-17 23:13:03 +08:00
ci(workflow): 优化 update-version.yml 中的版本信息更新逻辑
对 ALVersionInfo.py 文件的更新逻辑进行差异化处理,分别为 commit-release 和 build 阶段生成不同的 artifact: * 针对 commit-release 阶段:将所有与构建(build)相关的字段值设置为 'local' 或 'null' * 针对 build 阶段:保留完整的版本信息字段 这种差异化处理确保其后续提交的 release commit 不会包含构建相关的版本信息。
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
name: Commit Release
|
||||
|
||||
# This workflow commits version changes in 'ALVersionInfo.py' (get from artifacts) and
|
||||
# moves the release tag to this new release commit.
|
||||
#
|
||||
# It is triggered when called by the release workflow.
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
@@ -35,10 +40,12 @@ jobs:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download modified file
|
||||
# here we download the commit version of ALVersionInfo.py from artifacts
|
||||
# and replace the original file with it.
|
||||
- name: Download commit version of ALVersionInfo.py
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: updated-version-info
|
||||
name: updated-version-info-for-commit
|
||||
path: downloaded-file/
|
||||
|
||||
- name: Replace file with updated version
|
||||
|
||||
Reference in New Issue
Block a user