Skip to content

Commit a54493d

Browse files
committed
Fix gitversion
1 parent c655638 commit a54493d

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows/publish-nuget.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Publish NuGet Package
33
on:
44
push:
55
branches:
6-
- main # وقتی روی برنچ main پوش میشه
6+
- main
77
tags:
8-
- 'v*.*.*' # یا وقتی تگ با الگوی vX.Y.Z ساخته میشه
8+
- 'v*.*.*'
99

1010
jobs:
1111
publish:
@@ -15,22 +15,19 @@ jobs:
1515
- name: Checkout code
1616
uses: actions/checkout@v3
1717

18-
- name: Setup .NET
18+
- name: Setup .NET SDKs
1919
uses: actions/setup-dotnet@v4
2020
with:
2121
dotnet-version: |
2222
8.0.x
23-
10.0.x
23+
10.0.100-preview.4 # اگر نیاز به دات‌نت ۱۰ داری
2424
25-
- name: Setup GitVersion
26-
uses: gittools/actions/gitversion/[email protected]
25+
- name: Install and run GitVersion
26+
id: gitversion
27+
uses: gittools/actions/gitversion/[email protected]
2728
with:
2829
versionSpec: '5.x'
2930

30-
- name: Get version info
31-
id: gitversion
32-
run: gitversion /output json /showvariable NuGetVersionV2
33-
3431
- name: Restore dependencies
3532
run: dotnet restore
3633

@@ -44,7 +41,7 @@ jobs:
4441
--no-build -o out
4542
4643
- name: Push to NuGet
47-
if: success() && steps.gitversion.outputs.NuGetVersionV2 != ''
44+
if: success()
4845
run: |
4946
dotnet nuget push out/*.nupkg \
5047
--api-key ${{ secrets.NUGET_API_KEY }} \

0 commit comments

Comments
 (0)