77on :
88 push :
99 tags :
10- - ' *.*.*'
10+ - " *.*.*"
1111
1212jobs :
1313 create_release :
1414 runs-on : ubuntu-latest
1515
1616 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/setup@v0.9.9
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/execute@v0.9.9
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
4720
48- - name : Publish NuGet
49- uses : brandedoutcast/publish-nuget@v2.5.5
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/setup@v0.9.13
23+ with :
24+ versionSpec : " 5.x"
5425
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/execute@v0.9.13
5729
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/publish-nuget@v2.5.5
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