feat: 更新 CD 版本 #10

Merged
jiantw83 merged 1 commits from develop into master 2026-03-21 11:58:35 +00:00
2 changed files with 15 additions and 16 deletions
Showing only changes of commit e051028853 - Show all commits

View File

@@ -3,26 +3,25 @@ on:
branches:
- master
jobs:
cd:
name: "CD > 發布專案"
runs-on: docker
env:
RUNNER_TOOL_CACHE: /toolcache
version:
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 }}
with:
gitea-server: ${{ gitea.server_url }}
repository: ${{ gitea.repository }}
token: ${{ secrets.GITEA_TOKEN }}
release:
name: "CD > 發布專案"
runs-on: ubuntu
needs: version
steps:
- name: 發布專案
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
with:
tag_name: "v${{ steps.version.outputs.VERSION }}"
- name: 清理舊版本 (保留最新2個)
tag_name: "v${{ needs.version.outputs.version }}"
- name: 清理成品
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 }}
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}

View File

@@ -3,11 +3,11 @@ description: '推送 NUGET 套件'
author: 'Jeffery'
inputs:
RELEASE_VERSION:
required: true
description: '要推送的版本號ex: ${{ needs.calculate.outputs.version }}'
required: true
RELEASE_INDEX:
default: 0
description: '要推送的版本中第幾個成品,預設為 0'
default: 0
runs:
using: 'docker'
image: 'Dockerfile'