Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
publish:
runs-on: ubuntu-latest

permissions:
id-token: write # required for NuGet trusted publishing (OIDC token issuance)
contents: read

steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -39,5 +43,15 @@ jobs:
name: nuget-package
path: ./artifacts/*.nupkg

# Exchange the GitHub OIDC token for a short-lived nuget.org API key.
# Requires a Trusted Publishing policy configured on nuget.org for this
# repo + release.yml workflow. NUGET_USER is your nuget.org profile name
# (not your email). The key is valid for 1 hour, so fetch it just before push.
- name: NuGet login (OIDC → short-lived API key)
uses: NuGet/login@v1
id: nuget-login
with:
user: ${{ secrets.NUGET_USER }}

- name: Publish to NuGet
run: dotnet nuget push "./artifacts/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
run: dotnet nuget push "./artifacts/*.nupkg" --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.8" />
<PackageReference Include="Spectre.Console" Version="0.55.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.9" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.9" />
<PackageReference Include="Spectre.Console" Version="0.56.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.55.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.300" PrivateAssets="All" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Spectre.Console.Testing" Version="0.55.2" />
<PackageReference Include="Spectre.Console.Testing" Version="0.56.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading