加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
publish.ps1 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
$version = (Select-Xml -Path Directory.Build.props -XPath '/Project/PropertyGroup/Version').Node.'#text'
dotnet build --configuration Release
dotnet test --configuration Release
dotnet pack --configuration Release
$confirmation = Read-Host "Are you sure you want to push nuget packages v$version (y - yes, n - no):"
if ($confirmation -eq 'y') {
$apiKey = $Env:NUGET_API_KEY
dotnet nuget push .\FFmpeg.AutoGen\bin\Release\FFmpeg.AutoGen.$version.nupkg --source https://api.nuget.org/v3/index.json --api-key $apiKey
dotnet nuget push .\FFmpeg.AutoGen.Abstractions\bin\Release\FFmpeg.AutoGen.Abstractions.$version.nupkg --source https://api.nuget.org/v3/index.json --api-key $apiKey
dotnet nuget push .\FFmpeg.AutoGen.Bindings.DynamicallyLinked\bin\Release\FFmpeg.AutoGen.Bindings.DynamicallyLinked.$version.nupkg --source https://api.nuget.org/v3/index.json --api-key $apiKey
dotnet nuget push .\FFmpeg.AutoGen.Bindings.DynamicallyLoaded\bin\Release\FFmpeg.AutoGen.Bindings.DynamicallyLoaded.$version.nupkg --source https://api.nuget.org/v3/index.json --api-key $apiKey
dotnet nuget push .\FFmpeg.AutoGen.Bindings.StaticallyLinked\bin\Release\FFmpeg.AutoGen.Bindings.StaticallyLinked.$version.nupkg --source https://api.nuget.org/v3/index.json --api-key $apiKey
git tag v$version
git push origin v$version
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化