-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (37 loc) · 1.59 KB
/
Copy pathdotnet.yml
File metadata and controls
49 lines (37 loc) · 1.59 KB
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
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install dotnet SDK 8.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.x
- name: Display installed SDKs
run: dotnet --info
- name: Restore dependencies
run: dotnet restore -s https://api.nuget.org/v3/index.json --verbosity n
- name: Build
working-directory: ./
run: dotnet build --no-restore
- name: Run unit tests
working-directory: ./
run: dotnet test --no-build --verbosity normal
- name: Find packages
run: Get-ChildItem -Recurse -Filter *.nupkg | Select-Object FullName
- name: Pack library
working-directory: ./src/NW.UnivariateForecasting
run: dotnet pack --configuration Release --no-build --output bin/Release
- name: Publish library to NuGet.org
run: Get-ChildItem ./src/NW.UnivariateForecasting/bin/Release/*.nupkg | ForEach-Object { dotnet nuget push $_.FullName --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate }
- name: Pack tool
working-directory: ./src/NW.UnivariateForecasting.CLI
run: dotnet pack --configuration Release --no-build
- name: Publish tool to NuGet.org
run: Get-ChildItem ./src/NW.UnivariateForecasting.CLI/nupkg/*.nupkg | ForEach-Object { dotnet nuget push $_.FullName --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate }