File tree Expand file tree Collapse file tree 2 files changed +46
-16
lines changed
Expand file tree Collapse file tree 2 files changed +46
-16
lines changed Original file line number Diff line number Diff line change 55 tags :
66 - " v[0-9]+.[0-9]+.[0-9]+"
77 - " v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+"
8+ - " engine[0-9]+.[0-9]+.[0-9]+"
9+ - " engine[0-9]+.[0-9]+.[0-9]+-preview[0-9]+"
10+ - " input[0-9]+.[0-9]+.[0-9]+"
11+ - " input[0-9]+.[0-9]+.[0-9]+-preview[0-9]+"
812jobs :
913 release-nuget :
1014
2125 id : get_version
2226 uses : battila7/get-version-action@v2
2327
24- - name : Restore dependencies
25- run : dotnet restore engine/Orbit.Engine/Orbit.Engine.csproj
26-
27- - name : Build
28- run : dotnet build --configuration Release --no-restore engine/Orbit.Engine/Orbit.Engine.csproj /p:Version=${{ steps.get_version.outputs.version-without-v }}
29-
30- - name : Pack
31- run : dotnet pack engine/Orbit.Engine/Orbit.Engine.csproj -c Release /p:Version=${{ steps.get_version.outputs.version-without-v }} --no-build --output .
32-
33- - name : Push
34- run : dotnet nuget push Bijington.Orbit.Engine.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
35- env :
36- GITHUB_TOKEN : ${{ secrets.NUGET_API_KEY }}
37-
38- - name : Push symbols
39- run : dotnet nuget push Bijington.Orbit.Engine.${{ steps.get_version.outputs.version-without-v }}.snupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
28+ - name : Package releases
29+ shell : pwsh
30+ run : |
31+ .\scripts\package-releases.ps1 -Version ${{ steps.get_version.outputs.version-without-v }} -ApiKey ${{ secrets.NUGET_API_KEY }}
4032 env :
4133 GITHUB_TOKEN : ${{ secrets.NUGET_API_KEY }}
Original file line number Diff line number Diff line change 1+ param (
2+ [string ]$Directory ,
3+ [string ]$Version ,
4+ [string ]$ApiKey
5+ )
6+
7+ $ProjectFilter = " *.csproj"
8+
9+ if ($Version -like " v*" ) {
10+ $Version = $Version.Substring (1 )
11+ } elseif ($Version -like " input*" ) {
12+ $Version = $Version.Substring (5 )
13+ $ProjectFilter = " Orbit.Input.csproj"
14+ } elseif ($Version -like " engine*" ) {
15+ $Version = $Version.Substring (6 )
16+ $ProjectFilter = " Orbit.Engine.csproj"
17+ }
18+
19+ Get-ChildItem - Path $Directory - Recurse - Filter $ProjectFilter |
20+ Where-Object { $_.Name -notlike " *Test*" } |
21+ ForEach-Object {
22+ Write-Host " Restoring $ ( $_.FullName ) "
23+ dotnet restore $_
24+
25+ Write-Host " Building $ ( $_.FullName ) "
26+ dotnet build -- configuration Release -- no- restore $_ / p:Version= $Version
27+
28+ Write-Host " Packing $ ( $_.FullName ) "
29+ dotnet pack $_ - c Release / p:Version= $Version -- no- build -- output .
30+
31+ $PackageWithVersion = " Bijington.$ ( $_.Directory.Name ) .$Version "
32+
33+ Write-Host " Pushing $PackageWithVersion .nupkg"
34+ dotnet nuget push " $PackageWithVersion .nupkg" - s https:// api.nuget.org/ v3/ index.json - k $ApiKey
35+
36+ Write-Host " Pushing $PackageWithVersion .snupkg"
37+ dotnet nuget push " $PackageWithVersion .snupkg" - s https:// api.nuget.org/ v3/ index.json - k $ApiKey
38+ }
You can’t perform that action at this time.
0 commit comments