-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 975 Bytes
/
publish.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: Publish nuget package
on:
release:
types:
- published
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ProjectionTools.sln
- name: Build
run: dotnet build -c Release -p:ContinuousIntegrationBuild=true --no-restore ProjectionTools.sln
- name: Test
run: dotnet test -c Release /p:CollectCoverage=true --no-build --no-restore --verbosity normal ProjectionTools.Tests/ProjectionTools.Tests.csproj
- name: Pack nugets
run: dotnet pack -c Release --no-build --no-restore --output . ProjectionTools/ProjectionTools.csproj
- name: Push nupkg to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json