-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.1 KB
/
publishnuget.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
name: Publish to Nuget
on:
push:
branches: [ main ]
paths:
- 'StreamRegex.Extensions/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.x
include-prerelease: true
- name: Nerdbank.GitVersioning
uses: dotnet/[email protected]
with:
setAllVars: true
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Build
run: dotnet pack --no-restore StreamRegex.Extensions -o NuPkgs
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]
with:
nuget-api-key: ${{secrets.NUGET_API_KEY}}
- name: Nuget Publish
run: nuget push NuPkgs/*.*nupkg -Source https://api.nuget.org/v3/index.json