Skip to content

Commit 07d157a

Browse files
Fix version in release-notes install commands (#43)
The GitHub Release body interpolated the raw tag name (e.g. v1.4.0) into the install commands, producing an invalid '--version v1.4.0'. Add a step that strips the leading 'v' and use the resolved package version (1.4.0) in the release notes. NuGet push was already correct (uses the csproj version). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e3b3580 commit 07d157a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
- name: Push to NuGet
3838
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
3939

40+
- name: Resolve package version
41+
id: version
42+
run: echo "value=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
43+
4044
- name: Create GitHub Release
4145
uses: softprops/action-gh-release@v3
4246
with:
@@ -46,13 +50,13 @@ jobs:
4650
## Install
4751
4852
```bash
49-
dotnet tool install --global DotnetTemplateMCP --version ${{ github.ref_name }}
53+
dotnet tool install --global DotnetTemplateMCP --version ${{ steps.version.outputs.value }}
5054
```
5155
5256
Or zero-install with `dnx` (.NET 10+):
5357
5458
```bash
55-
dnx -y DotnetTemplateMCP --version ${{ github.ref_name }}
59+
dnx -y DotnetTemplateMCP --version ${{ steps.version.outputs.value }}
5660
```
5761
5862
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.

0 commit comments

Comments
 (0)