Skip to content

Commit

Permalink
Publish to nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
jerviscui committed Feb 14, 2023
1 parent 13e322e commit d0f9d55
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions publish-nuget.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@set curdir=%cd%
:: echo %curdir%

:: build
@echo 1. build
@cd %curdir%\src

@cd ./RetryCore
dotnet clean >nul
dotnet build --configuration Release >nul

:: pack
@echo.
@echo 2. pack
@cd %curdir%\nupkgs
@del /s /q /f *.nupkg >nul 2>nul
@cd %curdir%\src

@cd ./RetryCore
dotnet pack -c Release -o %curdir%\nupkgs --no-build >nul

:: publish
@echo.
@echo 3. publish
@cd %curdir%\nupkgs
@for %%i in (*.nupkg) do @(
:: echo %%i
dotnet nuget push %%i --skip-duplicate -s https://api.nuget.org/v3/index.json --no-service-endpoint
)

@pause
2 changes: 1 addition & 1 deletion src/RetryCore/RetryCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Retry</RootNamespace>
<AssemblyName>RetryCore</AssemblyName>
Expand Down

0 comments on commit d0f9d55

Please sign in to comment.