nuget-trusted-publishing
仓库创建 2026年2月4日最近提交 14 小时前SkillHot 收录 20 天前
▸ 精选理由
提升发布安全性,免除长期凭据管理与轮换负担。
▸ 风险提示
需要修改 CI 配置并具备仓库权限,错误配置可能影响发布流程。
这个 Skill 做什么
在 GitHub Actions 中配置 NuGet 受信任发布(OIDC),替代长期 API Key。
把 GitHub Actions 与 nuget.org 的 OIDC 受信任发布配置好,让你不用长期保存 NuGet API Key,改用短期签发的令牌自动发布包。适合需要把包发布到 nuget.org 并想降低凭据泄露与轮换负担的仓库。关键特点是无密钥化(keyless)发布流程,但仅针对 nuget.org,不适用于私有 feed 或 Azure Artifacts。
▸ 展开 SKILL.md 英文原文
Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC, keyless NuGet publish, migrate from NuGet API key, NuGet/login, secure NuGet publishing. DO NOT USE FOR: publishing to private feeds or Azure Artifacts (OIDC is nuget.org only). INVOKES: shell (powershell or bash), edit, create, ask_user for guided repo setup.
4.8k
Stars
351
Forks
40
仓库内 Skill
+610
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-advanced/skills/nuget-trusted-publishing/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-advanced/skills/nuget-trusted-publishing/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# NuGet Trusted Publishing Setup Set up [NuGet trusted publishing](https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing) on a GitHub Actions repo. Replaces long-lived API keys with OIDC-based short-lived tokens — no secrets to rotate or leak. ## Prerequisites - **GitHub Actions** — this skill covers GitHub Actions setup only - **nuget.org account** — the user needs access to create trusted publishing policies ## When to Use This Skill Use this skill when: - Setting up trusted publishing for a NuGet package - Migrating from `secrets.NUGET_API_KEY` to OIDC-based publishing - Asked about keyless or secure NuGet publishing - Creating a new NuGet publish workflow from scratch
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有