feat: 使用新版本

This commit is contained in:
Jeffery
2026-03-20 16:49:42 +08:00
parent 3ca0c5a9ab
commit d7cd868c04
2 changed files with 18 additions and 11 deletions

View File

@@ -67,11 +67,13 @@ PATCH=$((PATCH + 1))
# 如果 MINOR >= 10重置為 0 並增加 MAJOR 版本
[ $MINOR -ge 10 ] && { MINOR=0; MAJOR=$((MAJOR + 1)); }
# 組合新的版本號
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
# 組合新的版本號,並顯示
NEW_VERSION="$MAJOR.$MINOR.$PATCH" && echo "NEW_VERSION=$NEW_VERSION"
# 確保 GITHUB_OUTPUT 檔案的目錄存在
mkdir -p "$(dirname "$GITHUB_OUTPUT")"
# 將版本輸出到環境變數
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
exit 0