11on :
2- workflow_call :
2+ workflow_call :
33 inputs :
44 feedUrl :
5- description : ' NuGet feed URL'
5+ description : " NuGet feed URL"
66 required : true
77 type : string
88 forRelease :
9- description : ' Run for release?'
9+ description : " Run for release?"
1010 required : true
1111 type : boolean
1212 secrets :
1313 feedAPIKey :
14- description : ' NuGet feed API key'
14+ description : " NuGet feed API key"
1515 required : true
1616
1717jobs :
@@ -20,42 +20,42 @@ jobs:
2020 fail-fast : false
2121 runs-on : windows-latest
2222 steps :
23- - name : Checkout
24- uses : actions/checkout@v4
25- with :
26- fetch-depth : 0
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+ with :
26+ fetch-depth : 0
2727
28- - name : Git Semantic Version
29- id : version
30- uses : PaulHatch/semantic-version@v5.4.0
31- with :
32- tag_prefix : ' '
33- version_format : " ${major}.${minor}.${patch}${{ !inputs.forRelease && '-preview${increment}' || '' }}"
34- search_commit_body : true
28+ - name : Git Semantic Version
29+ id : version
30+ uses : PaulHatch/semantic-version@v5.4.0
31+ with :
32+ tag_prefix : " "
33+ version_format : " ${major}.${minor}.${patch}${{ !inputs.forRelease && '-preview${increment}' || '' }}"
34+ search_commit_body : true
3535
36- - name : Setup dotnet ${{ env.DOTNET_VERSION }}
37- uses : actions/setup-dotnet@v4
38- with :
39- dotnet-version : ${{ env.DOTNET_VERSION }}
36+ - name : Setup dotnet ${{ env.DOTNET_VERSION }}
37+ uses : actions/setup-dotnet@v4
38+ with :
39+ dotnet-version : ${{ env.DOTNET_VERSION }}
4040
41- - name : Build and Pack
42- run : dotnet build -c Release -p:Version=${{ steps.version.outputs.version}}
41+ - name : Build and Pack
42+ run : dotnet build -c Release -p:Version=${{ steps.version.outputs.version}}
4343
44- - name : Run tests
45- run : dotnet test -c Release --no-build
44+ - name : Run tests
45+ run : dotnet test -c Release --no-build
4646
47- - name : Upload dotnet test results
48- uses : dorny/test-reporter@v1.8.0
49- if : ${{ !cancelled() }}
50- with :
51- name : .NET Tests
52- path : ' TestResults/**/*.trx'
53- reporter : dotnet-trx
54- fail-on-error : true
55-
56- - name : Push to NuGet package feed
57- env :
58- NUGET_URL : ${{ inputs.feedUrl }}
59- NUGET_API_KEY : ${{ secrets.feedAPIKey }}
60- run : dotnet nuget push '**/*.nupkg' --source "$($env:NUGET_URL)" --api-key "$($env:NUGET_API_KEY)"
61- if : github.event_name == 'push'
47+ - name : Upload dotnet test results
48+ uses : dorny/test-reporter@v1.8.0
49+ if : ${{ !cancelled() }}
50+ with :
51+ name : .NET Tests
52+ path : " TestResults/**/*.trx"
53+ reporter : dotnet-trx
54+ fail-on-error : true
55+
56+ - name : Push to NuGet package feed
57+ env :
58+ NUGET_URL : ${{ inputs.feedUrl }}
59+ NUGET_API_KEY : ${{ secrets.feedAPIKey }}
60+ run : dotnet nuget push '**/*.nupkg' --source "$($env:NUGET_URL)" --api-key "$($env:NUGET_API_KEY)"
61+ if : github.event_name == 'push'
0 commit comments