From 9127f26fd8c909b9b86bacacb13ea0717ed280b5 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 11 Jul 2026 06:21:24 +0000 Subject: [PATCH 1/3] =?UTF-8?q?fix(calculate-version):=20=E7=B5=B1?= =?UTF-8?q?=E4=B8=80=E8=BC=B8=E5=87=BA=E8=A8=8A=E6=81=AF=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 87f9840..2df8892 100644 --- a/src/index.js +++ b/src/index.js @@ -4,13 +4,19 @@ const https = require('https'); const { URL } = require('url'); const RELEASES_PER_PAGE = 10; +let currentStage = null; function section(title) { - process.stdout.write(`\n==================================================\n${title}\n--------------------------------------------------\n`); + currentStage = title; } function info(message) { - process.stdout.write(`[info] ${message}\n`); + const timestamp = new Date() + .toLocaleString('sv-SE', { timeZone: 'Asia/Taipei', hour12: false }) + .replace(/-/g, '/'); + const stagePrefix = currentStage ? `[${currentStage}]` : ''; + + process.stdout.write(`${stagePrefix}[INF][${timestamp}]: ${message}\n`); } function fail(message) { From 7a71cddc809b42c81177844174a62a7f95792c6b Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 11 Jul 2026 06:21:24 +0000 Subject: [PATCH 2/3] =?UTF-8?q?docs(README):=20=E9=87=8D=E5=BB=BA=E5=B0=88?= =?UTF-8?q?=E6=A1=88=E8=AA=AA=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..add3d3a --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# calculate-version + +更新時間:2026/07/11 14:03:52(Asia/Taipei) + +這個專案是一個 Gitea Docker action,會讀取 repository 的 release 清單,計算下一個正式版或 beta 版本號,並將結果輸出成 action output。 + +## 專案列表 + +### 專案描述表 + +| 專案名稱 | 專案描述 | +| --- | --- | +| [calculate-version](https://gitea.jsc.idv.tw/actions/calculate-version/src/branch/develop/) | 這是一個用來計算 Gitea release 下一版版本號的 Node.js action,支援正式版與 beta 版推算。 | + +### 參考專案表 + +| 專案名稱 | 參考專案列表 | +| --- | --- | +| [calculate-version](https://gitea.jsc.idv.tw/actions/calculate-version/src/branch/develop/) | 無 | + +### NuGet 套件表 + +| 專案名稱 | NuGet 套件列表 | +| --- | --- | +| [calculate-version](https://gitea.jsc.idv.tw/actions/calculate-version/src/branch/develop/) | 無 | + +## 功能列表 + +### calculate-version + +| 功能名稱 | 功能描述 | +| --- | --- | +| 無 | 此專案未公開可列入 README 的功能。 | + +## 使用範例 + +此專案目前沒有可對外列入 README 的公開方法,因此沒有對應的使用範例。 From 84ea25ef11b62b3bcf8abc1799740139f01a6cc1 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 11 Jul 2026 06:24:24 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix(CI=20=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E7=A8=8B):=20=E4=BF=AE=E6=AD=A3=E7=B5=90=E6=9E=9C=20job=20?= =?UTF-8?q?=E7=9A=84=E6=A2=9D=E4=BB=B6=E5=88=A4=E6=96=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index ea69542..4c42b96 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -42,6 +42,7 @@ jobs: name: 3. RESULT runs-on: ubuntu needs: [build,test] + if: ${{ needs.build.outputs.is_beta == 'false' }} env: VERSION: ${{ needs.test.outputs.version }} IS_BETA: ${{ needs.build.outputs.is_beta }}