mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Add NuGet package tools
This commit is contained in:
1 parent
61f17e3c1d
commit
d8e19e74ed
14 files changed
+680
No files matched your search
@@ -0,0 +1,28 @@
|
||||
Param(
|
||||
[Parameter(Mandatory, Position = 0)]
|
||||
[string]$APIKey
|
||||
)
|
||||
|
||||
dotnet build -c Release
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Build failed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$count = 0
|
||||
$packages = (Get-ChildItem */bin/Release/*.nupkg)
|
||||
foreach ($package in $packages) {
|
||||
Write-Progress "Pushing packages" -CurrentOperation "Pushing $($package.Name)" -PercentComplete (($count * 100.0) / $packages.Length)
|
||||
|
||||
dotnet nuget push -k $APIKey -s https://api.nuget.org/v3/index.json $package.FullName
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Unable to push $($package.Name)"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$count++
|
||||
}
|
||||
|
||||
Write-Progress "Done" -Completed
|
||||
Write-Output "Successfully pushed $count packages"
|
||||
Reference in new issue
Block a user