Skip to content

Commit f493e30

Browse files
phmatrayclaude
andcommitted
fix: move git tag creation before package build for MinVer
The workflow was creating the git tag AFTER building NuGet packages, but MinVer needs the tag to exist BEFORE the build to calculate the correct version. This was causing packages to be versioned as 2.0.1-alpha.0.2 instead of 3.0.0. Changes: - Moved "Create tag" step to execute after "Update version" and before "Restore dependencies" - Now the v3.0.0 tag exists when dotnet pack runs - MinVer will detect the tag and create packages with version 3.0.0 This fixes the NuGet package publishing issue for v3.0.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 2309987 commit f493e30

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,14 @@ jobs:
119119
sed -i "s|<Version>.*</Version>|<Version>${VERSION}</Version>|g" "$file"
120120
fi
121121
done
122-
122+
123+
- name: Create tag
124+
if: steps.should_release.outputs.new_release == 'true'
125+
uses: mathieudutour/github-tag-action@v6.2
126+
with:
127+
github_token: ${{ secrets.GITHUB_TOKEN }}
128+
custom_tag: ${{ steps.get_version.outputs.new_version }}
129+
123130
- name: Restore dependencies
124131
if: steps.should_release.outputs.new_release == 'true'
125132
run: dotnet restore
@@ -165,14 +172,7 @@ jobs:
165172
github-token: ${{ secrets.GITHUB_TOKEN }}
166173
skip-commit: true
167174
output-file: false
168-
169-
- name: Create tag
170-
if: steps.should_release.outputs.new_release == 'true'
171-
uses: mathieudutour/github-tag-action@v6.2
172-
with:
173-
github_token: ${{ secrets.GITHUB_TOKEN }}
174-
custom_tag: ${{ steps.get_version.outputs.new_version }}
175-
175+
176176
- name: Push to NuGet
177177
if: steps.should_release.outputs.new_release == 'true'
178178
run: |

0 commit comments

Comments
 (0)