28
.gitea/workflows/master.yaml
Normal file
28
.gitea/workflows/master.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
cd:
|
||||||
|
name: "CD > 發布專案"
|
||||||
|
runs-on: develop
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
|
steps:
|
||||||
|
- name: 計算版本號
|
||||||
|
id: version
|
||||||
|
uses: https://gitea.jsc.idv.tw/jiantw83/calculate-version-action@v${{ vars.CALCULATE_VERSION }}
|
||||||
|
with:
|
||||||
|
gitea-server: ${{ gitea.server_url }}
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
- name: 發布專案
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
tag_name: "v${{ steps.version.outputs.VERSION }}"
|
||||||
|
- name: 清理舊版本 (保留最新2個)
|
||||||
|
uses: https://gitea.jsc.idv.tw/jiantw83/cleanup-release-action@v${{ vars.CLEANUP_RELEASE_VERSION }}
|
||||||
|
with:
|
||||||
|
gitea-server: ${{ gitea.server_url }}
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
27
action.yaml
Normal file
27
action.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: 'DOTNET PACK'
|
||||||
|
description: '打包套件'
|
||||||
|
author: 'Jeffery'
|
||||||
|
inputs:
|
||||||
|
project:
|
||||||
|
required: true
|
||||||
|
configuration:
|
||||||
|
default: 'Release'
|
||||||
|
repository:
|
||||||
|
required: true
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
description:
|
||||||
|
default: '共用套件'
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
cd "${{ gitea.workspace }}/${{ inputs.project }}"
|
||||||
|
dotnet pack -c "${{ inputs.configuration }}" -o "${{ gitea.workspace }}/output" \
|
||||||
|
/p:PackageVersion="${{ inputs.version }}" \
|
||||||
|
/p:RepositoryUrl="${{ inputs.repository }}" \
|
||||||
|
/p:RepositoryType="git" \
|
||||||
|
/p:Authors="Jeffery" \
|
||||||
|
/p:Company="jsc.idv.tw" \
|
||||||
|
/p:Copyright="Copyright©2025 jsc.idv.tw" \
|
||||||
|
/p:Description="${{ inputs.description }}"
|
||||||
Reference in New Issue
Block a user