Skip to content

Commit 190f4f8

Browse files
fix(035): also set assembly Version from git tag so spectra --version works
The pack steps were passing -p:PackageVersion= only, which sets the .nupkg metadata version but leaves the assembly's AssemblyInformationalVersion at the project default. Adding -p:Version= alongside makes the runtime CLI banner show the released version (e.g., "spectra --version" → "1.37.0") instead of the default "0.1.0+<sha>". Caught while smoke-testing the v1.37.0 local install.
1 parent 7257cf1 commit 190f4f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737
run: dotnet test --configuration Release --no-build
3838

3939
- name: Pack Spectra.Core
40-
run: dotnet pack src/Spectra.Core/Spectra.Core.csproj --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ steps.version.outputs.VERSION }}
40+
run: dotnet pack src/Spectra.Core/Spectra.Core.csproj --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ steps.version.outputs.VERSION }} -p:Version=${{ steps.version.outputs.VERSION }}
4141

4242
- name: Pack Spectra.CLI
43-
run: dotnet pack src/Spectra.CLI/Spectra.CLI.csproj --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ steps.version.outputs.VERSION }}
43+
run: dotnet pack src/Spectra.CLI/Spectra.CLI.csproj --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ steps.version.outputs.VERSION }} -p:Version=${{ steps.version.outputs.VERSION }}
4444

4545
- name: Pack Spectra.MCP
46-
run: dotnet pack src/Spectra.MCP/Spectra.MCP.csproj --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ steps.version.outputs.VERSION }}
46+
run: dotnet pack src/Spectra.MCP/Spectra.MCP.csproj --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ steps.version.outputs.VERSION }} -p:Version=${{ steps.version.outputs.VERSION }}
4747

4848
- name: Push to NuGet.org
4949
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)