-
Notifications
You must be signed in to change notification settings - Fork 8
72 lines (69 loc) · 2.81 KB
/
dotnet.yml
File metadata and controls
72 lines (69 loc) · 2.81 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Release
on:
push:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
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: 5.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: .\main
- name: NerdBank.GitVersioning
uses: dotnet/nbgv@v0.3.1
id: nbgv
with:
path: .\main
- name: Build
run: >
dotnet build -c Release
-p:AssemblyVersion=${{ steps.nbgv.outputs.AssemblyVersion }}
-p:AssemblyFileVersion=${{ steps.nbgv.outputs.AssemblyFileVersion }}
-p:AssemblyInformationalVersion=${{ steps.nbgv.outputs.AssemblyInformationalVersion }}
--no-restore
working-directory: .\main
- name: Test
run: dotnet test -c Release --no-build --verbosity normal .\test\ReCode.Cocoon.Proxy.Tests
working-directory: .\main
- name: PackLegacy
run: >
dotnet pack --configuration Release --no-build
-p:PackageVersion=${{ steps.nbgv.outputs.SimpleVersion }}${{ steps.nbgv.outputs.PrereleaseVersion }}
--output . src\ReCode.Cocoon.Legacy\ReCode.Cocoon.Legacy.csproj
working-directory: .\main
- name: PackProxy
working-directory: .\main
run: >
dotnet pack --configuration Release --no-build
-p:PackageVersion=${{ steps.nbgv.outputs.SimpleVersion }}${{ steps.nbgv.outputs.PrereleaseVersion }}
--output . src\ReCode.Cocoon.Proxy\ReCode.Cocoon.Proxy.csproj
- name: PackProxyBlazorServer
working-directory: .\main
run: >
dotnet pack --configuration Release --no-build
-p:PackageVersion=${{ steps.nbgv.outputs.SimpleVersion }}${{ steps.nbgv.outputs.PrereleaseVersion }}
--output . src\ReCode.Cocoon.Proxy.BlazorServer\ReCode.Cocoon.Proxy.BlazorServer.csproj
- name: PackProxyBlazorWasm
working-directory: .\main
run: >
dotnet pack --configuration Release --no-build
-p:PackageVersion=${{ steps.nbgv.outputs.SimpleVersion }}${{ steps.nbgv.outputs.PrereleaseVersion }}
--output . src\ReCode.Cocoon.Proxy.BlazorWasm\ReCode.Cocoon.Proxy.BlazorWasm.csproj
- name: PackProxyBlazorWasmAuth
working-directory: .\main
run: >
dotnet pack --configuration Release --no-build
-p:PackageVersion=${{ steps.nbgv.outputs.SimpleVersion }}${{ steps.nbgv.outputs.PrereleaseVersion }}
--output . src\ReCode.Cocoon.Proxy.BlazorWasmAuth\ReCode.Cocoon.Proxy.BlazorWasmAuth.csproj
- name: Push
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
working-directory: .\main