fix(ci): publish version from tag; drop --skip-duplicate and version trap - #17
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
non-deterministic date-based FileVersion). Version now flows from $(VersionPrefix) locally
and the tag in CI; PackageVersion/FileVersion/AssemblyVersion all derive from it.