Skip to content

Commit 3959b4b

Browse files
committed
update publishing instruction too remove leading v from github release
1 parent 9edb702 commit 3959b4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ jobs:
2323
- name: Build solution
2424
run: dotnet build Throttlr.Api.RateLimit.sln --configuration Release --no-restore
2525

26+
# ${{ github.ref_name#v }} strips the leading v we add in the release on github ex. v1.0.0.
27+
# So a GitHub tag v1.0.0 becomes 1.0.0 for NuGet.
2628
- name: Pack NuGet package
27-
run: dotnet pack src/Throttlr.Api.RateLimit/RateLimit.Throttlr.csproj --configuration Release -o ./artifacts /p:PackageVersion=${{ github.ref_name }}
29+
run: dotnet pack src/Throttlr.Api.RateLimit/RateLimit.Throttlr.csproj --configuration Release -o ./artifacts /p:PackageVersion=${{ github.ref_name#v }}
2830

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

0 commit comments

Comments
 (0)