-
Notifications
You must be signed in to change notification settings - Fork 18
45 lines (36 loc) · 1.1 KB
/
dotnet.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
name: .NET
on:
push:
branches: [ "main" ]
tags: [ "*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build src -c Release -p:ContinuousIntegrationBuild=true
- name: Test
run: |
.\net40\Iesi.Collections.Test.exe
.\net462\Iesi.Collections.Test.exe
.\net6.0\Iesi.Collections.Test.exe
.\net8.0\Iesi.Collections.Test.exe
working-directory: src\Iesi.Collections.Test\bin\Release
- name: Pack
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
run: dotnet pack src -o out --no-build
- name: Push
run: dotnet nuget push *.nupkg -s nuget.org -k $Env:NUGET_API_KEY
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
working-directory: out
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}