File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish NuGet package
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v3
14+
15+ - name : Setup .NET Core
16+ uses : actions/setup-dotnet@v2
17+ with :
18+ dotnet-version : ' 6.x'
19+
20+ - name : Restore dependencies
21+ run : dotnet restore
22+
23+ - name : Build & Pack NuGet package
24+ shell : pwsh
25+ run : |
26+ $tag = $env:GITHUB_REF.Substring('refs/tags/v'.Length)
27+ dotnet pack src/FluentAssertions.Analyzers/ --output out --configuration Release --include-symbols -p:Version=$tag
28+
29+ - name : Publish NuGet package
30+ shell : pwsh
31+ run : |
32+ $symbols = Get-ChildItem out/*.symbols.nupkg | ForEach-Object FullName;
33+ foreach ($symbol in $symbols) {
34+ Write-Host "Pushing symbols $symbol";
35+ $nupkg = $symbol.Replace(".symbols.nupkg",".nupkg");
36+ Write-Host "Pushing nupkg $nupkg";
37+ dotnet nuget push $nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json;
38+ }
You can’t perform that action at this time.
0 commit comments