Skip to content

Commit

Permalink
optimization: workflow 优化 (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuoZhuoCrayon committed Oct 30, 2021
1 parent 2684f78 commit 546c7f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/auto_version_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
DEV_LOG_ROOT: "dev_log"
# 发布日志所在目录
RELEASE_LOG_ROOT: "release"
RELEASE_MD_PATH: "docs/release.md"
# tag 名称前缀
TAG_NAME_PREFIX: "V"
# release 名称前缀
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
echo "🚀 prerelease_version -> $prerelease_version"
# 获取发布日志路径并更新发布日志
release_log_path=$( python scripts/workflows/release/upgrade_release_log.py -d ${{ env.DEV_LOG_ROOT }} -r ${{ env.RELEASE_LOG_ROOT }} )
release_log_path=$( python scripts/workflows/release/upgrade_release_log.py -d ${{ env.DEV_LOG_ROOT }} -r ${{ env.RELEASE_LOG_ROOT }} -p ${{ env.RELEASE_MD_PATH }} -v $prerelease_version )
echo "🌟 release_log_path -> $release_log_path"
release_log=$( cat "$release_log_path" )
echo "📒 release_log -> 👇👇👇 $release_log"
Expand Down
2 changes: 1 addition & 1 deletion scripts/workflows/release/upgrade_release_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def extract_params(argv) -> Dict[str, Union[str, bool, int, float]]:
params = extract_params(sys.argv[1:])
dev_log_root = params["dev-log-root"]
release_log_root = params["release-log-root"]
release_md_path = params["release-md-path"] or os.path.join(release_log_root, "readme.md")
release_md_path = params["release-md-path"] or os.path.join(release_log_root, "release.md")

# 获取等待发布的版本号
prerelease_version = params["prerelease-version"] or get_prerelease_version(dev_log_root=dev_log_root)
Expand Down

0 comments on commit 546c7f0

Please sign in to comment.