-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path_publish-nuget.bat
More file actions
28 lines (24 loc) · 1.14 KB
/
Copy path_publish-nuget.bat
File metadata and controls
28 lines (24 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@echo off
@REM Publish SpawnDev.ILGPU.ML to NuGet.org.
@REM Captain authority required per push (see D:\users\tj\Projects\CLAUDE.md NuGet
@REM Package Publishing -> Official Publish section). Never run without an explicit
@REM "go" from Captain in the same session.
set projectPath=%~dp0SpawnDev.ILGPU.ML
set releaseFolder=%projectPath%\bin\Release
@echo:
@echo === SpawnDev.ILGPU.ML (NUGET.ORG) ===
FOR /F "eol=| delims=" %%I IN ('DIR "%releaseFolder%\*.nupkg" /A-D /B /O-D /TW 2^>nul') DO SET "NewestFile=%%I" & GOTO FoundFile
ECHO No *.nupkg file found
GOTO :EOF
:FoundFile
ECHO Latest *.nupkg file is:
ECHO %NewestFile%
@REM Non-interactive push. API key resolution order:
@REM 1. NUGET_API_KEY environment variable, if set.
@REM 2. Stored credential in %AppData%\Roaming\NuGet\NuGet.Config, set once via:
@REM nuget setapikey YOUR_KEY -Source https://api.nuget.org/v3/index.json
@IF NOT "%NUGET_API_KEY%" == "" (
dotnet nuget push "%releaseFolder%\%NewestFile%" --api-key %NUGET_API_KEY% --source https://api.nuget.org/v3/index.json
) else (
dotnet nuget push "%releaseFolder%\%NewestFile%" --source https://api.nuget.org/v3/index.json
)