7
7
on :
8
8
push :
9
9
tags :
10
- - ' *.*.*'
10
+ - " *.*.*"
11
11
12
12
jobs :
13
13
create_release :
14
14
runs-on : ubuntu-latest
15
15
16
16
steps :
17
- - uses : actions/checkout@v2
18
- - name : Fetch all history for all tags and branches
19
- run : git fetch --unshallow || true
20
-
21
- - name : Install GitVersion
22
- uses :
gittools/actions/gitversion/[email protected]
23
- with :
24
- versionSpec : ' 5.x'
25
-
26
- - name : Use GitVersion
27
- id : gitversion # step id used as reference for output values
28
- uses :
gittools/actions/gitversion/[email protected]
29
-
30
- - run : |
31
- echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
32
- echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
33
-
34
- - name : Setup .NET Core
35
- uses : actions/setup-dotnet@v1
36
- with :
37
- dotnet-version : 3.1.301
38
-
39
- - name : Install dependencies
40
- run : dotnet restore
41
-
42
- - name : Build solution
43
- run : dotnet build --configuration Release --no-restore
44
-
45
- - name : Execute unit tests
46
- run : dotnet test
17
+ - uses : actions/checkout@v2
18
+ - name : Fetch all history for all tags and branches
19
+ run : git fetch --unshallow || true
47
20
48
- - name : Publish NuGet
49
- uses :
brandedoutcast/[email protected]
50
- with :
51
- PROJECT_FILE_PATH : HttpBinding/HttpBinding.csproj
52
- VERSION_STATIC : ${{ steps.gitversion.outputs.nuGetVersionV2 }}
53
- NUGET_KEY : ${{secrets.NUGET_KEY}}
21
+ - name : Install GitVersion
22
+ uses :
gittools/actions/gitversion/[email protected]
23
+ with :
24
+ versionSpec : " 5.x"
54
25
55
- - name : Create NuGet package
56
- run : dotnet pack ./HttpBinding/HttpBinding.csproj -c Release -o ${{ env.OUTPUT_PATH }} /p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersionV2 }}
26
+ - name : Use GitVersion
27
+ id : gitversion # step id used as reference for output values
28
+ uses :
gittools/actions/gitversion/[email protected]
57
29
58
- - name : Create release
59
- id : create_release
60
- uses : softprops/action-gh-release@v1
61
- env :
62
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63
- with :
64
- name : Release ${{ steps.gitversion.outputs.nuGetVersionV2 }}
65
- tag_name : ${{ steps.gitversion.outputs.nuGetVersionV2 }}
66
- files : |
67
- ${{ env.OUTPUT_PATH }}AzureFunctions.HttpBinding.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg
68
- draft : false
69
- prerelease : false
30
+ - run : |
31
+ echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
32
+ echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
33
+
34
+ - name : Setup .NET Core
35
+ uses : actions/setup-dotnet@v1
36
+ with :
37
+ dotnet-version : 3.1.301
38
+
39
+ - name : Install dependencies
40
+ run : dotnet restore
41
+
42
+ - name : Build solution
43
+ run : dotnet build --configuration Release --no-restore
44
+
45
+ - name : Execute unit tests
46
+ run : dotnet test
47
+
48
+ - name : Publish NuGet
49
+ uses :
brandedoutcast/[email protected]
50
+ with :
51
+ PROJECT_FILE_PATH : HttpBinding/HttpBinding.csproj
52
+ VERSION_STATIC : ${{ steps.gitversion.outputs.nuGetVersionV2 }}
53
+ NUGET_KEY : ${{secrets.NUGET_KEY}}
54
+
55
+ - name : Create NuGet package
56
+ run : dotnet pack ./HttpBinding/HttpBinding.csproj -c Release -o ${{ env.OUTPUT_PATH }} /p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersionV2 }}
57
+
58
+ - name : Create release
59
+ id : create_release
60
+ uses : softprops/action-gh-release@v1
61
+ env :
62
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63
+ with :
64
+ name : Release ${{ steps.gitversion.outputs.nuGetVersionV2 }}
65
+ tag_name : ${{ steps.gitversion.outputs.nuGetVersionV2 }}
66
+ files : |
67
+ ${{ env.OUTPUT_PATH }}AzureFunctions.HttpBinding.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg
68
+ draft : false
69
+ prerelease : false
0 commit comments