Escape from Duckov 游戏的 DLL 库 NuGet 包。
-
安装并登录 GitHub CLI:
winget install GitHub.cli gh auth login --scopes write:packages -
运行脚本:
.\Update-DuckovGameLibs.ps1
脚本会自动从游戏的 Info.ini 读取版本信息,打包并发布到 GitHub Packages。
注意: 如果遇到 403 错误,说明 GitHub CLI 的 Token 缺少 write:packages 权限。脚本会自动尝试刷新权限,如果失败,请重新登录:
gh auth login --scopes write:packages.\Update-DuckovGameLibs.ps1 -DuckovPath "C:\Games\Escape from Duckov".\Update-DuckovGameLibs.ps1 -SkipPublish创建或编辑 nuget.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="github" value="https://nuget.pkg.github.com/Duckov-Custom-Model/index.json" />
</packageSources>
<packageSourceCredentials>
<github>
<add key="Username" value="Duckov-Custom-Model" />
<add key="ClearTextPassword" value="%GITHUB_TOKEN%" />
</github>
</packageSourceCredentials>
</configuration>dotnet nuget update source github --username Duckov-Custom-Model --password <YOUR_TOKEN> --store-password-in-clear-text --configfile nuget.config编辑 .csproj 文件:
<ItemGroup>
<PackageReference Include="DuckovGameLibs" Version="1.1.6-Steam" />
</ItemGroup>MIT License