6.4K Star 12.1K Fork 4.1K

GVPdotNET China / Furion

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nuget-push.ps1 867 Bytes
一键复制 编辑 原始数据 按行查看 历史
# 定义参数
Param(
# NuGet APIKey
[string] $apikey
)
Write-Warning "正在发布 framework 目录 NuGet 包......";
# 查找 .\framework\nupkgs 下所有目录
cd .\framework\nupkgs;
$framework_nupkgs = Get-ChildItem -Filter *.nupkg;
# 遍历所有 *.nupkg 文件
for ($i = 0; $i -le $framework_nupkgs.Length - 1; $i++){
$item = $framework_nupkgs[$i];
$nupkg = $item.FullName;
$snupkg = $nupkg.Replace(".nupkg", ".snupkg");
Write-Output "-----------------";
$nupkg;
# 发布到 nuget.org 平台
dotnet nuget push $nupkg --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json;
dotnet nuget push $snupkg --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json;
Write-Output "-----------------";
}
# 回到项目根目录
cd ../../;
Write-Warning "发布成功";
C#
1
https://gitee.com/dotnetchina/Furion.git
git@gitee.com:dotnetchina/Furion.git
dotnetchina
Furion
Furion
v4

搜索帮助