-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 1.11 KB
/
main.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
name: NuGet package publish
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
upload-to-npgk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.0.5
with:
nuget-version: latest
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --framework net8.0 --no-build --verbosity normal
- name: Pack
# CHANGE PACKAGE VERSION - The retarded way
# Change the /p:VERSION=X.X.X part to change the actual package version.
run: dotnet pack --configuration Release /p:VERSION=4.1.0.${{ github.run_number }} --version-suffix ${{ github.sha }}
- name: Upload to NuGet
run: dotnet nuget push ./source/X39.Solutions.PdfTemplate/bin/Release/X39.Solutions.PdfTemplate.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}