Skip to content

ci(github): get NuGet package version from release tag#113

Merged
j-d-ha merged 4 commits into
mainfrom
fix/nuget-publish-gets-version-from-release
Nov 10, 2025
Merged

ci(github): get NuGet package version from release tag#113
j-d-ha merged 4 commits into
mainfrom
fix/nuget-publish-gets-version-from-release

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Nov 10, 2025

Copy link
Copy Markdown
Collaborator

🚀 Pull Request

📋 Summary

Updates the publish workflow to extract the NuGet package version from the GitHub release tag instead of reading from Directory.Build.props. This ensures published packages always match the release version, eliminating version discrepancies and simplifying release management.


✅ Checklist

  • My changes build cleanly
  • I've added/updated relevant tests
  • I've added/updated documentation or README
  • I've followed the coding style for this project
  • I've tested the changes locally (if applicable)

🧪 Related Issues or PRs

Closes #...


💬 Notes for Reviewers

Key Changes:

  • Extracts version from github.event.release.tag_name
  • Strips v prefix if present (e.g. v1.0.01.0.0)
  • Passes version to dotnet pack via /p:VersionPrefix MSBuild property
  • Simplifies validation to focus on API key check

Benefits:

  • Package version guaranteed to match the release tag
  • Eliminates manual version sync during releases
  • Release tag becomes the single source of truth

Testing:

  • Verify workflow runs successfully on next release publish
  • Confirm NuGet package version matches release tag
  • Verify packages upload correctly to nuget.org

Extract the version from the GitHub release tag instead of reading from
Directory.Build.props. Pass the version to dotnet pack via MSBuild property
to ensure published packages always match the release version.

- Extract version from github.event.release.tag_name
- Strip 'v' prefix if present (e.g. v1.0.0 -> 1.0.0)
- Pass version to pack command via /p:VersionPrefix property
- Simplify validation to focus on API key check
- Add a note referencing Conventional Commits for documentation standards
- Include heading for v0.1.1 changes but remove redundant text
- Change release notes heading from "Changes in this Release" to "Summary"
- Add placeholder for summary (SUMMARY_GOES_HERE) above changes section
- Add step to strip header and summary in update-changelog workflow
- Use Perl script to clean up CHANGELOG content before committing
@github-actions github-actions Bot added the type: ci CI/CD changes label Nov 10, 2025
@j-d-ha j-d-ha changed the title ci(publish): get NuGet package version from release tag ci(github): get NuGet package version from release tag Nov 10, 2025
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 10, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #113   +/-   ##
=======================================
  Coverage   50.12%   50.12%           
=======================================
  Files          52       52           
  Lines        1640     1640           
  Branches      204      204           
=======================================
  Hits          822      822           
  Misses        765      765           
  Partials       53       53           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ecdf82...981a81e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@j-d-ha
j-d-ha merged commit 2267029 into main Nov 10, 2025
8 of 9 checks passed
@j-d-ha
j-d-ha deleted the fix/nuget-publish-gets-version-from-release branch November 10, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant