File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ name: Publish NuGet Package
3
3
on :
4
4
push :
5
5
branches :
6
- - main # وقتی روی برنچ main پوش میشه
6
+ - main
7
7
tags :
8
- - ' v*.*.*' # یا وقتی تگ با الگوی vX.Y.Z ساخته میشه
8
+ - ' v*.*.*'
9
9
10
10
jobs :
11
11
publish :
@@ -15,22 +15,19 @@ jobs:
15
15
- name : Checkout code
16
16
uses : actions/checkout@v3
17
17
18
- - name : Setup .NET
18
+ - name : Setup .NET SDKs
19
19
uses : actions/setup-dotnet@v4
20
20
with :
21
21
dotnet-version : |
22
22
8.0.x
23
- 10.0.x
23
+ 10.0.100-preview.4 # اگر نیاز به داتنت ۱۰ داری
24
24
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]
27
28
with :
28
29
versionSpec : ' 5.x'
29
30
30
- - name : Get version info
31
- id : gitversion
32
- run : gitversion /output json /showvariable NuGetVersionV2
33
-
34
31
- name : Restore dependencies
35
32
run : dotnet restore
36
33
44
41
--no-build -o out
45
42
46
43
- name : Push to NuGet
47
- if : success() && steps.gitversion.outputs.NuGetVersionV2 != ''
44
+ if : success()
48
45
run : |
49
46
dotnet nuget push out/*.nupkg \
50
47
--api-key ${{ secrets.NUGET_API_KEY }} \
You can’t perform that action at this time.
0 commit comments