-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (38 loc) · 1.31 KB
/
Release.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
46
47
48
49
name: Release
env:
CONFIGURATION: Release
on:
release:
types: [created]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install tools
run: dotnet tool restore
# gitversion calculates assembly version based on tag (etc)
# adds properties to project file
# also adds environment variables
- name: GitVersion
run: dotnet dotnet-gitversion /output buildserver /updateprojectfiles
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8
include-prerelease: true
- name: Install dependencies
run: dotnet restore
# ContinuousIntegrationBuild obfuscates source file paths
- name: Build
run: dotnet build --no-restore --configuration $Env:CONFIGURATION /p:ContinuousIntegrationBuild=true
- name: Test
run: dotnet test --no-build --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Pack
run: dotnet pack --no-build -p:PackageVersion=$Env:GitVersion_NuGetVersionV2
- name: Publish
env:
NugetKey: ${{ secrets.NuGetKey }}
run: dotnet nuget push (Get-ChildItem *.nupkg -Recurse) --api-key $Env:NuGetKey --source https://api.nuget.org/v3/index.json