This document describes how to publish a new version of the GoogleMapsApi NuGet package.
Releases are tag-driven: pushing a git tag matching v* to origin triggers the Publish Nuget workflow, which builds the package and pushes it to NuGet.org.
- Push access to
origin - A clean working tree on the latest
master:git checkout master git pull git status # should be clean - The
NUGET_API_KEYsecret is configured as areleaseenvironment secret (one-time setup — see.agents/build-release-ci.md) - You can approve the
releaseenvironment deployment (the publish run pauses for a required reviewer)
release.sh reads the latest v* tag, computes the next version, and pushes the tag for you.
./release.sh # patch bump (e.g. 1.4.5 → 1.4.6)
./release.sh minor # minor bump (e.g. 1.4.5 → 1.5.0)
./release.sh major # major bump (e.g. 1.4.5 → 2.0.0)Preview without making changes:
./release.sh --dry-run
./release.sh minor --dry-runThe script:
- Verifies the working tree is clean
- Reads the latest
v*tag - Computes the next version based on the bump type (defaults to
patch) - Generates release notes from the commit log via
claude -p, using Keep a Changelog categories (Added/Changed/Deprecated/Removed/Fixed/Security) - Shows you the notes and prompts
y/Nbefore doing anything (--editopens them in$EDITORfirst) - On confirmation:
- Moves
## [Unreleased]content into a new## [NEW_VERSION] - YYYY-MM-DDsection inCHANGELOG.mdand refreshes the compare-link footnotes - Commits
CHANGELOG.mdaschore(release): vX.Y.Zand pushes it to the current branch - Creates the annotated tag (with the notes as the tag message) and pushes it to
origin - Creates a GitHub Release with the same notes
- Moves
Use --no-notes to skip the claude -p step, the CHANGELOG.md update, and the GitHub Release — useful for out-of-band hotfix tags where you just want to push the v* tag.
If you want to pick an explicit version (out-of-band release, hotfix on an older line, etc.):
git tag v1.4.6
git push origin v1.4.6If you go this route, update CHANGELOG.md by hand: move the ## [Unreleased] content into a new ## [1.4.6] - YYYY-MM-DD section and add a matching [1.4.6]: …/compare/v1.4.5...v1.4.6 footnote.
Both options end at the same place — a v* tag in origin — and trigger the same workflow.
- patch — bug fixes, dependency bumps, internal cleanup; no public API change
- minor — new functionality, backwards-compatible additions
- major — breaking changes to the public API
.github/workflows/nuget.yml runs on push of any v* tag:
- Waits for approval — the publish job runs in the
releaseenvironment, so the run pauses on "Review deployments" until a required reviewer approves (this is the human gate; nothing below runs first) - Checks out the repo with full history and tags (
fetch-depth: 0) at the tagged commit - Installs the .NET SDKs needed to build all target frameworks
dotnet restore→dotnet build -c Release→dotnet pack -c Release— MinVer derives the package version from thev*tag at build time (v1.4.6→1.4.6); no csproj is patched. Commits without a tag get a unique prerelease version (e.g.1.4.7-alpha.0.3), so only tagged builds publish a stable release.dotnet nuget push *.nupkg --api-key $NUGET_API_KEY --skip-duplicate
--skip-duplicate means re-running the workflow with the same version is a no-op rather than an error.
- Watch the run: https://github.com/maximn/google-maps/actions
- Approve the deployment — the run pauses on "Review deployments"; approve the
releaseenvironment to let the publish proceed (a reviewer can also reject it to abort) - Once green, the new version appears at https://www.nuget.org/packages/GoogleMapsApi/ (usually within a few minutes)
Delete the tag locally and remotely, then re-run:
git tag -d v1.4.6
git push origin :refs/tags/v1.4.6NuGet does not allow re-uploading or hard-deleting a published version. Bump to the next patch and publish again:
./release.sh patchYou can optionally unlist the bad version on NuGet.org so it no longer appears in search results, but existing consumers who pinned to it can still restore it.
Open the failed run in the Actions tab, fix the underlying issue, and either:
- Re-run the failed job (safe —
--skip-duplicatehandles the case where the package was already pushed), or - Push a fresh tag with the next version