File tree Expand file tree Collapse file tree 6 files changed +71
-11
lines changed
Expand file tree Collapse file tree 6 files changed +71
-11
lines changed Original file line number Diff line number Diff line change 1+ name : Release Package
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' **.csproj'
9+ - ' **.cs'
10+ - ' **.yaml'
11+
12+ jobs :
13+ release-github :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Setup .NET
22+ uses : actions/setup-dotnet@v4
23+ with :
24+ dotnet-version : |
25+ 9.0.x
26+ 8.0.x
27+ 7.0.x
28+ 6.0.x
29+ cache : true
30+ cache-dependency-path : ' **/packages.lock.json'
31+
32+ - uses : dotnet/nbgv@master
33+ id : nbgv
34+
35+ - name : Restore dependencies
36+ run : dotnet restore --locked-mode
37+
38+ - name : Build
39+ run : dotnet build --no-restore -c Release
40+
41+ - name : Generate Nuget Package
42+ run : dotnet pack --no-build -c Release --output ./artifacts
43+
44+ - name : Create Release
45+ id : create_release
46+ uses : softprops/action-gh-release@v1
47+ with :
48+ tag_name : ${{ steps.nbgv.outputs.NuGetPackageVersion }}
49+ env :
50+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51+
52+ - name : Upload NuGet Package to Release
53+ uses : softprops/action-gh-release@v1
54+ with :
55+ files : ./artifacts/*.nupkg
56+ env :
57+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1- name : .NET Build, Test, and Publish
1+ name : Release Package
22
33on :
4- workflow_dispatch :
4+ workflow_dispatch :
55
66jobs :
7- release :
7+ release-nuget :
88 runs-on : ubuntu-latest
99 steps :
1010 - name : Checkout repository
1515 - name : Setup .NET
1616 uses : actions/setup-dotnet@v4
1717 with :
18- dotnet-version : ' 8.0.x'
18+ dotnet-version : |
19+ 9.0.x
20+ 8.0.x
21+ 7.0.x
22+ 6.0.x
1923 cache : true
2024 cache-dependency-path : ' **/packages.lock.json'
2125
2529 - name : Build
2630 run : dotnet build --no-restore -c Release
2731
28- - name : Run tests
29- run : dotnet test --no-build -c Release
30-
3132 - name : Generate Nuget Package
3233 run : dotnet pack --no-build -c Release --output ./artifacts
3334
Original file line number Diff line number Diff line change 2020 - name : Setup .NET
2121 uses : actions/setup-dotnet@v4
2222 with :
23- dotnet-version : ' 8.0.x'
23+ dotnet-version : |
24+ 9.0.x
25+ 8.0.x
2426 cache : true
2527 cache-dependency-path : ' **/packages.lock.json'
2628
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22 <PropertyGroup >
3- <TargetFramework > net9.0</TargetFramework >
3+ <TargetFrameworks >net8.0; net9.0</TargetFrameworks >
44 <ImplicitUsings >enable</ImplicitUsings >
55 <Nullable >enable</Nullable >
66 <IsPackable >false</IsPackable >
Original file line number Diff line number Diff line change 66 </PropertyGroup >
77 <ItemGroup >
88 <PackageReference Include =" Shouldly" Version =" 4.*" />
9- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.*" />
9+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 17.13. *" />
1010 <PackageReference Include =" xunit" Version =" 2.*" />
1111 <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.*" >
1212 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json" ,
3- "version" : " 0.6 -alpha.{height}" ,
3+ "version" : " 0.1 -alpha.{height}" ,
44 "nuGetPackageVersion" : {
55 "semVer" : 2.0
66 },
You can’t perform that action at this time.
0 commit comments