@@ -19,30 +19,25 @@ jobs:
1919 name : Publish release
2020 runs-on : ubuntu-latest
2121 needs : test
22- if : github.event_name != 'pull_request'
2322 permissions :
2423 contents : write
2524
2625 steps :
2726
28- # https://github.com/marketplace/actions/setup-net-core-sdk
2927 - name : Setup .NET SDK
3028 uses : actions/setup-dotnet@v4
3129 with :
3230 dotnet-version : 9.x
3331
34- # https://github.com/marketplace/actions/checkout
3532 - name : Checkout code
3633 uses : actions/checkout@v4
3734 with :
3835 fetch-depth : 0
3936
40- # https://github.com/marketplace/actions/nerdbank-gitversioning
4137 - name : Run Nerdbank.GitVersioning
4238 id : nbgv
4339 uses : dotnet/nbgv@master
4440
45- # https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build
4641 - name : Build project
4742 run : >-
4843 dotnet build ./LanguageTags/LanguageTags.csproj
@@ -54,24 +49,19 @@ jobs:
5449 -property:InformationalVersion=${{ steps.nbgv.outputs.AssemblyInformationalVersion }}
5550 -property:PackageVersion=${{ steps.nbgv.outputs.SemVer2 }}
5651
57- # https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push
5852 - name : Publish to NuGet.org
59- if : github.event_name != 'pull_request'
6053 run : >-
6154 dotnet nuget push ${{ github.workspace }}/Publish/*.nupkg
6255 --source https://api.nuget.org/v3/index.json
6356 --api-key ${{ secrets.NUGET_API_KEY }}
6457 --skip-duplicate
6558
6659 - name : Zip output
67- if : github.event_name != 'pull_request'
6860 run : |
6961 cp ./LanguageData/*.json ./Publish/
7062 7z a -t7z ./Publish/LanguageTags.7z ./Publish/*
7163
72- # https://github.com/marketplace/actions/gh-release
7364 - name : Create GitHub release
74- if : github.event_name != 'pull_request'
7565 uses : softprops/action-gh-release@v2
7666 with :
7767 generate_release_notes : true
0 commit comments