-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
53 lines (45 loc) · 1.82 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: 'Publish NuGet Package on Proedis Registry'
description: 'Restore, build and pack a .csproj and publish the NuGet Package on Proedis Private Registry'
author: 'Proedis'
inputs:
project-folder:
description: 'The folder that is containing the .csproj file'
project-file:
description: 'The project main file name, including the .csproj extension'
registry-api-key:
description: 'The ApiKey to use while pushing the package'
nuget-version:
description: 'The NuGet Version to use'
default: 'latest'
dotnet-version:
description: 'The DotNet Version to use'
default: '6.x'
runs:
using: 'composite'
steps:
- name: Checkout Branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET SDK ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Setup NuGet CLI ${{ inputs.nuget-version }}
uses: NuGet/setup-nuget@v1.1.1
with:
nuget-version: ${{ inputs.nuget-version }}
- name: Compute Version using NerdBank.GitVersioning
uses: dotnet/nbgv@v0.4
id: nbgv
with:
path: ${{ inputs.project-folder }}
- name: Build Project ${{ inputs.project-file }}
run: dotnet build '${{ inputs.project-folder }}/${{ inputs.project-file }}' -c Release -p:Version=${{ steps.nbgv.outputs.SemVer2 }}
shell: bash
- name: Pack Project ${{ inputs.project-file }}
run: nuget pack '${{ inputs.project-folder }}/${{ inputs.project-file }}' -Prop Configuration=Release -Version ${{ steps.nbgv.outputs.SemVer2 }}
shell: bash
- name: Publish Package
run: dotnet nuget push *.nupkg -k ${{ inputs.registry-api-key }} -s https://nuget.registry.proedis.net/v3/index.json
shell: bash