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:
- master
jobs:
calculate:
version:
name: "CD > 計算版本號"
runs-on: ubuntu-latest
runs-on: ubuntu
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: 計算版本號
id: calculate
uses: https://gitea.housefun.com.tw/HP_TOOL/calculate-version-action@v${{ vars.CALCULATE_VERSION }}
with:
gitea-server: ${{ gitea.server_url }}
repository: ${{ gitea.repository }}
token: ${{ secrets.GITEA_TOKEN }}
outputs:
version: ${{ steps.calculate.outputs.VERSION }}
cd:
needs: [calculate]
name: "[CD] 發布專案"
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
id: version
uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }}
release:
name: "CD > 發布專案"
runs-on: ubuntu
needs: version
steps:
- name: 發布專案
uses: akkuman/gitea-release-action@v1
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
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 }}