Files
next-version/action.yml
T
bot 021f86ad61
ci / test (push) Successful in 2s
初始版本
2026-11-05 04:12:38 +00:00

29 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: next-version
description: "計算下一個版本號(Docker action,bash+git+curl):讀 git 標籤(可選再加 Go 套件庫)中最新的 vX.Y.Z,只遞增 patch、每位最大 9;測試通道輸出 vX.Y.Z-dev.N。變更全是文件等檔案時 skip=true。需要 fetch-depth: 0 的 checkout"
inputs:
channel:
description: "release=正式版 vX.Y.Z;dev=測試版 vX.Y.Z-dev.N(X.Y.Z 是下一個正式版)"
default: release
go_registry:
description: "true=也把 Gitea 的 Go 套件庫已有的版本算進去(需要 token 有 read:package);false=只看 git 標籤"
default: "false"
package:
description: "go_registry 為 true 時查詢的套件名稱(預設是儲存庫名稱)"
default: ""
docs_pattern:
description: "只動這些檔案就跳過(skip=true)的 egrep 規則(預設 ^docs/|\\.md$,即 docs/ 與 *.md)"
default: ""
token:
description: "go_registry 為 true 時查詢套件庫用的權杖(需要 read:package)"
default: ""
outputs:
version:
description: 下一個版本(沒有任何版本時是 v0.0.1)
skip:
description: "true=和最新標籤相比只動了 docs_pattern 的檔案,不需要發佈"
latest:
description: 目前最新的正式版(沒有時是空字串)
runs:
using: docker
image: Dockerfile