feat: 修改 CD 工作流

This commit is contained in:
Jeffery
2026-04-08 09:40:08 +08:00
parent c93342fce5
commit 7b46ea894f
+16 -18
View File
@@ -3,27 +3,25 @@ on:
branches: branches:
- master - master
jobs: jobs:
calculate: version:
name: "CD > 計算版本號" name: "CD > 計算版本號"
runs-on: ubuntu-latest runs-on: ubuntu
outputs:
version: ${{ steps.version.outputs.version }}
steps: steps:
- name: 計算版本號 - name: 計算版本號
id: calculate id: version
uses: https://gitea.housefun.com.tw/HP_TOOL/calculate-version-action@v${{ vars.CALCULATE_VERSION }} uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }}
with: release:
gitea-server: ${{ gitea.server_url }} name: "CD > 發布專案"
repository: ${{ gitea.repository }} runs-on: ubuntu
token: ${{ secrets.GITEA_TOKEN }} needs: version
outputs:
version: ${{ steps.calculate.outputs.VERSION }}
cd:
needs: [calculate]
name: "[CD] 發布專案"
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps: steps:
- name: 發布專案 - name: 發布專案
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
with: with:
tag_name: "v${{ needs.calculate.outputs.version }}" tag_name: "v${{ needs.version.outputs.version }}"
- name: 清理成品
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
with:
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}