@@ -44,10 +44,10 @@ jobs:
4444 - name : Setup .NET
4545 uses : actions/setup-dotnet@v4
4646 with :
47- dotnet-version : ' 8 .0.x'
47+ dotnet-version : ' 6 .0.x'
4848
4949 # Create the NuGet package in the folder from the environment variable NuGetDirectory
50- - run : dotnet build --configuration Release --output ${{ env.NuGetDirectory }} .\Rws.MultiselectLanguageComboBox\Rws.MultiselectLanguageComboBox\Rws.MultiselectLanguageComboBox.csproj --p:Version=${{ env.GitVersion_Major }}.${{ env.GitVersion_Minor }}.${{ env.GitVersion_Patch }}
50+ - run : dotnet pack --configuration Release --output ${{ env.NuGetDirectory }} .\Rws.MultiselectLanguageComboBox\Rws.MultiselectLanguageComboBox\Rws.MultiselectLanguageComboBox.csproj --p:Version=${{ env.GitVersion_Major }}.${{ env.GitVersion_Minor }}.${{ env.GitVersion_Patch }}
5151
5252 # Publish the NuGet package as an artifact, so they can be used in the following jobs
5353 - uses : actions/upload-artifact@v3
@@ -57,29 +57,28 @@ jobs:
5757 retention-days : 7
5858 path : ${{ env.NuGetDirectory }}/*.nupkg
5959
60- deploy :
61- needs : create_nuget
62- # Publish only when creating a GitHub Release
63- # https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
64- # You can update this logic if you want to manage releases differently
65- runs-on : windows-latest
66- steps :
67- # Download the NuGet package created in the previous job
68- - uses : actions/download-artifact@v3
69- with :
70- name : nuget
71- path : ${{ env.NuGetDirectory }}
72-
73- # Install the .NET SDK indicated in the global.json file
74- - name : Setup .NET Core
75- uses : actions/setup-dotnet@v4
76-
77- # Publish all NuGet packages to NuGet.org
78- # Use --skip-duplicate to prevent errors if a package with the same version already exists.
79- # If you retry a failed workflow, already published packages will be skipped without error.
80- - name : Publish NuGet package
81- run : |
82- foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
83- dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
84- }
85-
60+ deploy :
61+ needs : create_nuget
62+ # Publish only when creating a GitHub Release
63+ # https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
64+ # You can update this logic if you want to manage releases differently
65+ runs-on : windows-latest
66+ steps :
67+ # Download the NuGet package created in the previous job
68+ - uses : actions/download-artifact@v3
69+ with :
70+ name : nuget
71+ path : ${{ env.NuGetDirectory }}
72+
73+ # Install the .NET SDK indicated in the global.json file
74+ - name : Setup .NET Core
75+ uses : actions/setup-dotnet@v4
76+
77+ # Publish all NuGet packages to NuGet.org
78+ # Use --skip-duplicate to prevent errors if a package with the same version already exists.
79+ # If you retry a failed workflow, already published packages will be skipped without error.
80+ - name : Publish NuGet package
81+ run : |
82+ foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
83+ dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
84+ }
0 commit comments