Skip to content

Add GitVersion-based release packaging for NuGet artifacts#11

Merged
sharpninja merged 6 commits intomainfrom
copilot/add-gitversion-to-solution
Mar 18, 2026
Merged

Add GitVersion-based release packaging for NuGet artifacts#11
sharpninja merged 6 commits intomainfrom
copilot/add-gitversion-to-solution

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

The repository was packing NuGet artifacts in CI, but versions were still manually derived and the packages stopped at workflow artifacts. This change moves package versioning to GitVersion-generated SemVer and wires tagged builds to publish the resulting packages into both GitHub Releases and the repository NuGet feed.

  • Semantic versioning

    • Added a repo-local GitVersion tool manifest and GitVersion.yml.
    • Switched package version generation from ad hoc CI suffixing to GitVersion-driven PackageVersion.
  • Workflow release publishing

    • Extended the existing build workflow to:
      • fetch full history for version calculation
      • restore local tools
      • compute semVer once per run
      • use that version for both BitNetSharp.Core and BitNetSharp.App packages
    • Added v* tag handling so tagged builds:
      • upload .nupkg files to the corresponding GitHub release
      • push the same packages to GitHub Packages NuGet feed
  • Documentation

    • Added a GitBook page describing local version calculation and tagged release behavior.
    • Linked the new page from docs/README.md and docs/SUMMARY.md.
  • Packaging flow example

    - name: Calculate semantic version
      id: gitversion
      run: |
        echo "semVer=$(dotnet tool run dotnet-gitversion /output json /showvariable SemVer /nonormalize)" >> "$GITHUB_OUTPUT"
    
    - name: Pack BitNetSharp.Core
      run: dotnet pack src/BitNetSharp.Core/BitNetSharp.Core.csproj \
        --configuration Release \
        --no-build --no-restore \
        -p:PackageVersion=${{ steps.gitversion.outputs.semVer }}

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: sharpninja <16146732+sharpninja@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitVersion to generate semver for nuget packages Add GitVersion-based release packaging for NuGet artifacts Mar 17, 2026
Copilot AI requested a review from sharpninja March 17, 2026 23:45
@sharpninja sharpninja marked this pull request as ready for review March 17, 2026 23:48
Copilot AI review requested due to automatic review settings March 17, 2026 23:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces GitVersion-driven semantic versioning for the repo’s NuGet artifacts and extends the CI workflow so v* tag builds publish packages to both GitHub Releases and GitHub Packages.

Changes:

  • Add a repo-local GitVersion tool manifest and GitVersion.yml for SemVer calculation.
  • Update the CI workflow to compute a single version per run, pack with that version, and publish on version tags.
  • Add GitBook documentation for local version calculation and tagged release publishing, and link it from the docs index.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
dotnet-tools.json Adds GitVersion.Tool to the repo’s .NET tool manifest.
GitVersion.yml Defines GitVersion configuration (branch/tag handling and increments).
.github/workflows/build.yml Fetches full history, computes SemVer, uses it for packing, and publishes on tags.
docs/releases-and-packaging.md Documents local GitVersion usage and tag-based publishing behavior.
docs/README.md Adds link to the new releases/packaging page.
docs/SUMMARY.md Adds the new page to GitBook navigation.

sharpninja and others added 3 commits March 17, 2026 18:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: sharpninja <16146732+sharpninja@users.noreply.github.com>
Co-authored-by: sharpninja <16146732+sharpninja@users.noreply.github.com>
@sharpninja sharpninja merged commit 24199df into main Mar 18, 2026
2 checks passed
@sharpninja sharpninja deleted the copilot/add-gitversion-to-solution branch March 18, 2026 00:13
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.

3 participants