Skip to content

ci: add NuGet publish workflow#178

Merged
NichUK merged 1 commit into
mainfrom
chore/nuget-publish-workflow
Jun 14, 2026
Merged

ci: add NuGet publish workflow#178
NichUK merged 1 commit into
mainfrom
chore/nuget-publish-workflow

Conversation

@NichUK

@NichUK NichUK commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a release-published workflow for publishing FixedPointNano packages to NuGet.org
  • Build and test before packing
  • Derive PackageVersion from the release tag, accepting v0.1 as 0.1.0 and standard SemVer tags directly
  • Push with --skip-duplicate so release workflow reruns are safe

Closes #171

Secret handling

  • Requires a repository secret named NUGET_API_KEY
  • Does not store any NuGet API key or secret value in the repository

Validation

  • git diff --check -- .github/workflows/publish.yml

Copilot AI review requested due to automatic review settings June 14, 2026 09:17
@NichUK NichUK merged commit d1f8df6 into main Jun 14, 2026
10 checks passed
@NichUK NichUK deleted the chore/nuget-publish-workflow branch June 14, 2026 09:19

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

Adds a GitHub Actions release workflow to build, test, pack, and publish the FixedPointNano NuGet package to NuGet.org when a GitHub Release is published.

Changes:

  • Introduces .github/workflows/publish.yml triggered on release: published.
  • Resolves PackageVersion from the release tag (with v0.10.1.0 normalization) and publishes using dotnet nuget push --skip-duplicate.

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

Comment on lines +32 to +35
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-+][0-9A-Za-z.-]+)?$ ]]; then
echo "Release tag '$GITHUB_REF_NAME' does not resolve to a SemVer package version." >&2
exit 1
fi
Comment on lines +44 to +46
- name: Run tests
run: dotnet test -c Release --no-build --logger "trx;LogFileName=test-results.trx" --results-directory TestResults

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.

[Repo Assist] eng: add NuGet package publishing workflow

2 participants