7 Commits

Author SHA1 Message Date
Jeffery
6041e730fa feat: 更新版本號 2026-03-20 17:12:10 +08:00
Jeffery
20d104ab9b test: 將版本檔案放到共用資料夾 2026-03-20 17:11:41 +08:00
Jeffery
f63edd5214 fix: 修正指令 2026-03-20 17:09:35 +08:00
Jeffery
22d14c0e9f feat: 發布新版 2026-03-20 17:07:22 +08:00
Jeffery
f03aa4ba23 feat: 在外部書出版本號 2026-03-20 17:06:00 +08:00
Jeffery
cf3194631f feat: 更新版本 2026-03-20 17:03:57 +08:00
Jeffery
7426c5d835 test: 嘗試使用兩種模式 2026-03-20 17:03:33 +08:00
3 changed files with 5 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ jobs:
- name: 發布專案 - name: 發布專案
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }} uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
with: with:
tag_name: "v0.1.5" tag_name: "v0.1.9"
- name: 清理舊版本 (保留最新2個) - name: 清理舊版本 (保留最新2個)
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }} uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
with: with:
@@ -25,8 +25,10 @@ jobs:
version: ${{ steps.version.outputs.version }} version: ${{ steps.version.outputs.version }}
steps: steps:
- name: 計算版本號 - name: 計算版本號
uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.1.9
- name: 輸出版本號
id: version id: version
uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.1.5 run: cat VERSION.txt >> $GITHUB_OUTPUT
test: test:
name: "TEST > 測試專案" name: "TEST > 測試專案"
runs-on: docker runs-on: docker

View File

@@ -1,13 +1,6 @@
name: 'CALCULATE VERSION' name: 'CALCULATE VERSION'
description: '計算版本號' description: '計算版本號'
author: 'Jeffery' author: 'Jeffery'
# inputs:
# RUNNER_TOKEN:
# description: 'Gitea Runner 用來存取的 Tokenex: ${{ secrets.RUNNER_TOKEN }}'
# required: true
outputs:
version:
description: '計算出的新版本號'
runs: runs:
using: 'docker' using: 'docker'
image: 'Dockerfile' image: 'Dockerfile'

View File

@@ -70,10 +70,5 @@ PATCH=$((PATCH + 1))
# 組合新的版本號,並顯示 # 組合新的版本號,並顯示
NEW_VERSION="$MAJOR.$MINOR.$PATCH" && echo "NEW_VERSION=$NEW_VERSION" 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_WORKSPACE/VERSION.txt"
exit 0