Skip to content

Commit 42482e5

Browse files
committed
actions
1 parent 8277572 commit 42482e5

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/actions/Action.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: 'DotNet NuGet Publish Action'
2+
description: 'Build, package, and publish a .NET project to a NuGet repository'
3+
author: 'Betalgo'
4+
5+
inputs:
6+
projectFilePath:
7+
description: 'Path to the .NET project file'
8+
required: true
9+
packageName:
10+
description: 'Name of the NuGet package'
11+
required: false
12+
versionFilePath:
13+
description: 'File path where the version information is stored'
14+
required: false
15+
versionRegex:
16+
description: 'Regular expression to extract version information'
17+
required: false
18+
versionStatic:
19+
description: 'Static version number to use'
20+
required: false
21+
tagCommit:
22+
description: 'Whether to tag the commit with the version'
23+
required: false
24+
default: 'false'
25+
tagFormat:
26+
description: 'The format of the tag'
27+
required: false
28+
nugetKey:
29+
description: 'NuGet API key'
30+
required: true
31+
nugetSource:
32+
description: 'NuGet source URL'
33+
required: true
34+
includeSymbols:
35+
description: 'Whether to include symbols in the NuGet package'
36+
required: false
37+
default: 'false'
38+
noBuild:
39+
description: 'Whether to skip the build process'
40+
required: false
41+
default: 'false'
42+
codeSignCertPath:
43+
description: 'Path to the code-signing certificate'
44+
required: false
45+
codeSignCertPassword:
46+
description: 'Password for the code-signing certificate'
47+
required: false
48+
49+
runs:
50+
using: 'composite'
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v2
54+
- name: Setup .NET
55+
uses: actions/setup-dotnet@v1
56+
with:
57+
dotnet-version: '6.0.x'
58+
- name: Build and run C# program
59+
run: |
60+
dotnet build -c Release
61+
dotnet run --project DotNuget.csproj --configuration Release -- ${{ inputs.projectFilePath }} ${{ inputs.packageName }}

0 commit comments

Comments
 (0)