Skip to content

fix(ci): publish version from tag; drop --skip-duplicate and version trap - #17

Merged
giammin merged 2 commits into
mainfrom
fix/publish-version-from-tag
Jul 23, 2026
Merged

fix(ci): publish version from tag; drop --skip-duplicate and version trap#17
giammin merged 2 commits into
mainfrom
fix/publish-version-from-tag

Conversation

@giammin

@giammin giammin commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Why

The v1.1.4 tag build ran green but published nothing. CI rebuilt the version
hardcoded in src/Directory.Build.targets (PackageVersion = $(VersionPrefix).3
= 1.1.3), which was already on nuget.org; the 409 was swallowed by
--skip-duplicate.

Changes

  • Publish workflow derives the package version from the tag (-p:Version=${GITHUB_REF_NAME#v}).
  • Removed --skip-duplicate so a duplicate/failed push fails the pipeline instead of passing silently.
  • Deleted src/Directory.Build.targets (hardcoded PackageVersion .3, stray versionBuild=4,
    non-deterministic date-based FileVersion). Version now flows from $(VersionPrefix) locally
    and the tag in CI; PackageVersion/FileVersion/AssemblyVersion all derive from it.

giammin and others added 2 commits July 23, 2026 12:57
The publish workflow rebuilt whatever version was hardcoded in
src/Directory.Build.targets (PackageVersion = $(VersionPrefix).3 = 1.1.3)
regardless of the git tag. Since 1.1.3 was already on nuget.org, the push
hit a 409 that --skip-duplicate swallowed, leaving the pipeline green while
publishing nothing for the v1.1.4 tag.

Pass -p:PackageVersion=${GITHUB_REF_NAME#v} so the published version follows
the tag. The command-line global property overrides the hardcoded value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Remove --skip-duplicate from the nuget push so a failed/duplicate push
  fails the pipeline instead of passing silently (this is what hid the
  v1.1.4 non-publish).
- Delete src/Directory.Build.targets, which hardcoded PackageVersion to
  $(VersionPrefix).3 (=1.1.3), carried a stray versionBuild=4, and set a
  non-deterministic date-based FileVersion (conflicting with Deterministic).
  Version now derives from $(VersionPrefix) locally and from -p:Version
  (the pushed tag) in the publish workflow, so PackageVersion, FileVersion
  and AssemblyVersion all track the release version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@giammin
giammin merged commit 7dfe2f1 into main Jul 23, 2026
1 check passed
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.

1 participant