From 13c0fce014e9f3228486b2370978fbc61d6fdd83 Mon Sep 17 00:00:00 2001 From: Ionel-Cristian Moldovan <66057010+icmoldovan@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:03:12 +0300 Subject: [PATCH] Im/main fix nuget package (#6) * use dotnet pack * add deploy job --- .github/workflows/build.yml | 55 +++++++++---------- .../Rws.MultiselectLanguageComboBox.csproj | 14 ++++- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3cfb8d..42601eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,10 +44,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' + dotnet-version: '6.0.x' # Create the NuGet package in the folder from the environment variable NuGetDirectory - - 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 }} + - 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 }} # Publish the NuGet package as an artifact, so they can be used in the following jobs - uses: actions/upload-artifact@v3 @@ -57,29 +57,28 @@ jobs: retention-days: 7 path: ${{ env.NuGetDirectory }}/*.nupkg - deploy: - needs: create_nuget - # Publish only when creating a GitHub Release - # https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository - # You can update this logic if you want to manage releases differently - runs-on: windows-latest - steps: - # Download the NuGet package created in the previous job - - uses: actions/download-artifact@v3 - with: - name: nuget - path: ${{ env.NuGetDirectory }} - - # Install the .NET SDK indicated in the global.json file - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - - # Publish all NuGet packages to NuGet.org - # Use --skip-duplicate to prevent errors if a package with the same version already exists. - # If you retry a failed workflow, already published packages will be skipped without error. - - name: Publish NuGet package - run: | - foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { - dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate - } - + deploy: + needs: create_nuget + # Publish only when creating a GitHub Release + # https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository + # You can update this logic if you want to manage releases differently + runs-on: windows-latest + steps: + # Download the NuGet package created in the previous job + - uses: actions/download-artifact@v3 + with: + name: nuget + path: ${{ env.NuGetDirectory }} + + # Install the .NET SDK indicated in the global.json file + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + + # Publish all NuGet packages to NuGet.org + # Use --skip-duplicate to prevent errors if a package with the same version already exists. + # If you retry a failed workflow, already published packages will be skipped without error. + - name: Publish NuGet package + run: | + foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { + dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + } diff --git a/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox.csproj b/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox.csproj index 3d61514..fef42eb 100644 --- a/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox.csproj +++ b/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox/Rws.MultiselectLanguageComboBox.csproj @@ -10,10 +10,20 @@ Copyright © Sdl Community 2023 WPF MultiselectLanguageCombo https://github.com/sdl/Multiselect-Language-ComboBox - True - 1.0.1 + true + 1.0.0 + Rws.MultiSelectLanguageComboBox + RWS + RWS + + + Rws.MultiselectLanguageComboBox + true + + +