feat: 重構
This commit is contained in:
48
action.yaml
48
action.yaml
@@ -1,6 +1,40 @@
|
||||
name: 'DOTNET PACK'
|
||||
description: '打包套件'
|
||||
description: '打包 NUGET 套件'
|
||||
author: 'Jeffery'
|
||||
inputs:
|
||||
CONFIGURATION:
|
||||
description: '組建配置'
|
||||
default: 'Release'
|
||||
RELEASE_PROJECT:
|
||||
description: '專案名稱'
|
||||
required: true
|
||||
RELEASE_VERSION:
|
||||
description: '專案版本'
|
||||
required: true
|
||||
RELEASE_AUTHOR:
|
||||
description: '專案作者'
|
||||
default: 'Jeffery'
|
||||
RELEASE_COMPANY:
|
||||
description: '公司名稱'
|
||||
default: 'jsc.idv.tw'
|
||||
RELEASE_DESCRIPTION:
|
||||
description: '專案描述'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
env:
|
||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
CONFIGURATION: ${{ inputs.CONFIGURATION }}
|
||||
RELEASE_PROJECT: ${{ inputs.RELEASE_PROJECT }}
|
||||
RELEASE_VERSION: ${{ inputs.RELEASE_VERSION }}
|
||||
RELEASE_AUTHOR: ${{ inputs.RELEASE_AUTHOR }}
|
||||
RELEASE_COMPANY: ${{ inputs.RELEASE_COMPANY }}
|
||||
RELEASE_COPYRIGHT: "Copyright©2025 ${{ inputs.RELEASE_COMPANY }}"
|
||||
RELEASE_DESCRIPTION: ${{ inputs.RELEASE_DESCRIPTION }}
|
||||
|
||||
|
||||
inputs:
|
||||
project:
|
||||
required: true
|
||||
@@ -17,11 +51,11 @@ runs:
|
||||
steps:
|
||||
- run: |
|
||||
cd "${{ gitea.workspace }}/${{ inputs.project }}"
|
||||
dotnet pack -c "${{ inputs.configuration }}" -o "${{ gitea.workspace }}/output" \
|
||||
/p:PackageVersion="${{ inputs.version }}" \
|
||||
/p:RepositoryUrl="${{ inputs.repository }}" \
|
||||
dotnet pack -c "$CONFIGURATION" -o "${{ gitea.workspace }}/output" \
|
||||
/p:PackageVersion="$RELEASE_VERSION" \
|
||||
/p:RepositoryUrl="$GITEA_REPOSITORY" \
|
||||
/p:RepositoryType="git" \
|
||||
/p:Authors="Jeffery" \
|
||||
/p:Company="jsc.idv.tw" \
|
||||
/p:Copyright="Copyright©2025 jsc.idv.tw" \
|
||||
/p:Authors="$RELEASE_AUTHOR" \
|
||||
/p:Company="$RELEASE_COMPANY" \
|
||||
/p:Copyright="$RELEASE_COPYRIGHT" \
|
||||
/p:Description="${{ inputs.description }}"
|
||||
Reference in New Issue
Block a user