From 150625680769af147f0d69e7dc06bf1dd0010280 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Thu, 7 Dec 2023 15:58:24 -0600 Subject: [PATCH] [build] create publish-nuget task --- Rakefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Rakefile b/Rakefile index 073a8e1984b7f..7fb18c0ed65a7 100644 --- a/Rakefile +++ b/Rakefile @@ -430,6 +430,17 @@ task 'publish-maven': JAVA_RELEASE_TARGETS do end end +NUGET_RELEASE_ASSETS = [ + "./bazel-bin/dotnet/src/webdriver/Selenium.WebDriver.#{dotnet_version}.nupkg", + "./bazel-bin/dotnet/src/webdriver/Selenium.Support.#{dotnet_version}.nupkg" +] + +task 'publish-nuget' do + NUGET_RELEASE_ASSETS.each do |asset| + sh "dotnet nuget push #{asset} --api-key #{ENV[:NUGET_API_KEY]} --source https://api.nuget.org/v3/index.json" + end +end + task 'publish-maven-snapshot': JAVA_RELEASE_TARGETS do creds = read_m2_user_pass if java_version.end_with?('-SNAPSHOT')