From 3a04e691dbd296f135cb91bcd5683e083fce3b6b Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 20 Mar 2026 18:07:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=A7=8B=20CD=20=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/master.yaml | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml index 61e85c2..c88f9f7 100644 --- a/.gitea/workflows/master.yaml +++ b/.gitea/workflows/master.yaml @@ -3,6 +3,15 @@ on: branches: - master jobs: + calculate: + name: "CD > 計算版本號" + runs-on: ubuntu + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - name: 計算版本號 + id: version + uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }} cd: name: "CD > 發布專案" runs-on: ubuntu @@ -10,27 +19,4 @@ jobs: - name: 發布專案 uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }} with: - tag_name: "v0.2.2" - - name: 清理舊版本 (保留最新2個) - uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }} - with: - gitea-server: ${{ gitea.server_url }} - repository: ${{ gitea.repository }} - token: ${{ secrets.GITEA_TOKEN }} - test-calculate: - name: "TEST > 計算版本號" - runs-on: ubuntu - needs: cd - outputs: - version: ${{ steps.version.outputs.version }} - steps: - - name: 計算版本號 - id: version - uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.2.2 - test: - name: "TEST > 測試專案" - runs-on: ubuntu - needs: test-calculate - steps: - - name: 顯示版本號 - run: echo ${{ needs.test-calculate.outputs.version }} \ No newline at end of file + tag_name: "v${{ steps.version.outputs.version }}" \ No newline at end of file