Skip to content

Publish Surge.NET package to GitHub Packages#184

Merged
peters merged 1 commit into
mainfrom
fix/nuget-github-packages-publish
Jun 26, 2026
Merged

Publish Surge.NET package to GitHub Packages#184
peters merged 1 commit into
mainfrom
fix/nuget-github-packages-publish

Conversation

@peters

@peters peters commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Purpose

Publish the Surge.NET NuGet package to the org GitHub Packages feed during releases.

Why

The beta release pipeline can pack Surge.NET, but nuget.org now rejects both configured org API-key secret paths with 403. The downstream app repos already use the org NuGet feed for private packages, so publishing the beta package there gives the release workflow a repository-managed credential path via GITHUB_TOKEN.

Impact

  • Grants the release workflow packages: write.
  • Pushes the packed .nupkg to https://nuget.pkg.github.com/fintermobilityas/index.json.
  • Leaves Rust crate publishing and GitHub release assets unchanged.

Validation

  • git diff --check
  • dotnet pack dotnet/Surge.NET/Surge.NET.csproj --configuration Release -p:Version=1.0.0-beta.49 --output /tmp/surge-pack-check

Migration Notes

Downstream app repos that use package source mapping need Surge.NET mapped to the fintermobilityas source before consuming the next beta.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release workflow to publish the Surge.NET NuGet package to the organization’s GitHub Packages feed during GitHub Releases, enabling package publication via the workflow GITHUB_TOKEN instead of nuget.org API keys.

Changes:

  • Grants the release workflow token packages: write permission.
  • Replaces the NuGet.org push step with a dotnet nuget push to the GitHub Packages NuGet endpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 15 to +17
permissions:
contents: write
packages: write
- name: Push to NuGet
run: dotnet nuget push ../nupkgs/*.nupkg --source nuget.org --api-key ${{ secrets.PETERSUNDE_NUGET_ORG_API_KEY }} --skip-duplicate
- name: Push to GitHub Packages
run: dotnet nuget push ../nupkgs/*.nupkg --source https://nuget.pkg.github.com/fintermobilityas/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
@peters peters merged commit dc47ff5 into main Jun 26, 2026
13 checks passed
@peters peters deleted the fix/nuget-github-packages-publish branch June 26, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants