File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22name : Publish NuGet package
33
44on :
5- workflow_dispatch :
65 push :
7- branches :
8- - main
6+ tags :
7+ - ' v*.*.*'
8+ workflow_dispatch :
9+
910env :
1011 ARTIFACTS_FEED_URL : https://api.nuget.org/v3/index.json
1112 DOTNET_VERSION : " 6.x"
@@ -43,12 +44,13 @@ jobs:
4344 - name : Setup NuGet.exe for use with actions
4445 uses : NuGet/setup-nuget@v1.0.5
4546
46- # Run dotnet pack
47- - name : dotnet build and publish
48- run : " nuget pack Neolution.CodeAnalysis.nuspec"
47+ - name : Pack main package
48+ run : nuget pack Neolution.CodeAnalysis.nuspec
49+
50+ - name : Pack TestsRuleset package
51+ run : nuget pack Neolution.CodeAnalysis.TestsRuleset.nuspec
4952
50- # Publish the package to Nuget.org
51- - name : " dotnet publish"
53+ - name : Push all packages
5254 run : dotnet nuget push --skip-duplicate -k $NUGET_AUTH_TOKEN **/*.nupkg
5355 env :
5456 NUGET_AUTH_TOKEN : ${{ secrets.NUGET_API_KEY_NEOLUTION }}
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+ workflow_dispatch :
9+
10+ env :
11+ DOTNET_VERSION : " 6.x"
12+
13+ jobs :
14+ publish :
15+ name : build & pack
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v2
20+ with :
21+ fetch-depth : 0 # Needed for GitVersion to function correctly
22+
23+ # Setup .NET Core SDK
24+ - name : Setup .NET Core
25+ uses : actions/setup-dotnet@v1
26+ with :
27+ dotnet-version : ${{ env.DOTNET_VERSION }}
28+
29+ - name : Install GitVersion
30+ uses : gittools/actions/gitversion/setup@v0.9.7
31+ with :
32+ versionSpec : ' 5.x'
33+
34+ - name : Determine Version
35+ uses : gittools/actions/gitversion/execute@v0.9.7
36+
37+ - name : Replace version number
38+ run : ' sed -i -e "s/{{NuGetVersion}}/$GITVERSION_NUGETVERSION/g" *.nuspec **/*.targets'
39+
40+ - name : Setup NuGet.exe for use with actions
41+ uses : NuGet/setup-nuget@v1.0.5
42+
43+ - name : Pack main package
44+ run : nuget pack Neolution.CodeAnalysis.nuspec
45+
46+ - name : Pack TestsRuleset package
47+ run : nuget pack Neolution.CodeAnalysis.TestsRuleset.nuspec
48+
Original file line number Diff line number Diff line change 1- mode : Mainline
1+ mode : ContinuousDelivery
22branches :
3- release :
3+ feature :
44 mode : ContinuousDeployment
55ignore :
66 sha : []
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments