Skip to content

Commit 86a8920

Browse files
committed
Get package name from repository name
1 parent c3618f7 commit 86a8920

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/release_nuget_workflow.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,6 @@ jobs:
5858
if defined SUFFIX (nuget pack %NUSPECPATH% -build -Suffix %SUFFIX% -Prop Configuration=Release -OutputDirectory "D:\\package\\")else (nuget pack %NUSPECPATH% -build -Prop Configuration=Release -OutputDirectory "D:\\package\\")
5959
6060
- name: nuget publish
61-
run: nuget push D:\package\github_release_nuget_workflow.%TAG_NAME%.nupkg ${{secrets.NUGET_TOKEN}} -Source https://api.nuget.org/v3/index.json
61+
run: nuget push D:\package\%REPO_NAME%.%TAG_NAME%.nupkg ${{secrets.NUGET_TOKEN}} -Source https://api.nuget.org/v3/index.json
62+
env:
63+
REPO_NAME: ${{ github.event.release.tag_name }}

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
### Prerequisites
3131

32-
- GitHub project secret named NUGET_TOKEN with a valid NuGet API key is set
32+
- GitHub project secret named NUGET_TOKEN with a valid NuGet API key is set
33+
- Github repository name must match the name of the library project
3334
- AssemblyVersion of the library matches the GitHub Release version tag
3435
Rules: **MAJOR.MINOR.PATCH must match**
3536
Example: **AssemblyVersion: 0.1.1**

0 commit comments

Comments
 (0)