Added msbuild option.
This commit is contained in:
@@ -36,6 +36,10 @@ inputs:
|
|||||||
description: "Keep the '.symbols.nupkg' artifacts. Default: true"
|
description: "Keep the '.symbols.nupkg' artifacts. Default: true"
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
|
useMSBuild:
|
||||||
|
description: "Whether or not to use MSBuild instead of dotnet. Default: false"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@@ -55,7 +59,14 @@ runs:
|
|||||||
#https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/versioning
|
#https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/versioning
|
||||||
MMP_VERSION="${{ steps.version.outputs.major || 0 }}.${{ steps.version.outputs.minor || 0 }}"
|
MMP_VERSION="${{ steps.version.outputs.major || 0 }}.${{ steps.version.outputs.minor || 0 }}"
|
||||||
|
|
||||||
COMMAND="pack \"${{ inputs.project }}\" --output \"${{ inputs.outputDirectory }}\""
|
USEMSBUILD="${{ inputs.useMSBuild }}"
|
||||||
|
if [[ "$USEMSBUILD" == "true" ]]; then
|
||||||
|
COMMAND="msbuild \"${{ inputs.project }}\" -t:pack"
|
||||||
|
else
|
||||||
|
COMMAND="pack \"${{ inputs.project }}\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
COMMAND="$COMMAND --output \"${{ inputs.outputDirectory }}\""
|
||||||
CONFIG="${{ inputs.configuration }}"
|
CONFIG="${{ inputs.configuration }}"
|
||||||
if [[ -n "$CONFIG" ]]; then
|
if [[ -n "$CONFIG" ]]; then
|
||||||
COMMAND="$COMMAND --configuration \"$CONFIG\""
|
COMMAND="$COMMAND --configuration \"$CONFIG\""
|
||||||
@@ -66,7 +77,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
VERSION="${{ inputs.version }}"
|
VERSION="${{ inputs.version }}"
|
||||||
if [[ -n "$VERSION" ]]; then
|
if [[ -n "$VERSION" ]]; then
|
||||||
COMMAND="$COMMAND -p:Version=$VERSION -p:AssemblyVersion=$MM_VERSION"
|
COMMAND="$COMMAND -p:Version=$VERSION -p:AssemblyVersion=$MMP_VERSION"
|
||||||
fi
|
fi
|
||||||
BRANCH="${{ inputs.repositoryBranch }}"
|
BRANCH="${{ inputs.repositoryBranch }}"
|
||||||
if [[ -n "$BRANCH" ]]; then
|
if [[ -n "$BRANCH" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user