-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (48 loc) · 1.49 KB
/
dotnet.yml
File metadata and controls
51 lines (48 loc) · 1.49 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
50
51
name: .NET
on:
push:
branches: [master]
pull_request:
branches: [master]
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.x
- name: Version
if: ${{ github.event_name != 'pull_request' }}
run: etc/scripts/write_version_targets.sh
shell: bash
- name: Restore dependencies
run: >
dotnet restore
- name: Build
run: >
dotnet build
--no-restore --configuration Release --framework netstandard2.0
Winton.Extensions.Threading.Actor/Winton.Extensions.Threading.Actor.csproj
- name: Test
run: >
dotnet test
--no-restore --verbosity normal --configuration Release --framework net5.0
Winton.Extensions.Threading.Actor.Tests.Unit/Winton.Extensions.Threading.Actor.Tests.Unit.csproj
- name: Pack
if: ${{ startsWith(matrix.os, 'windows-') }}
run: >
dotnet pack
--no-build --no-restore --configuration Release --output .
Winton.Extensions.Threading.Actor/Winton.Extensions.Threading.Actor.csproj
- name: Push
if: ${{ startsWith(matrix.os, 'windows-') && github.event_name == 'release' }}
run: >
dotnet nuget push
*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}