From e7dc974042de2f646257904baa315287d3bff3e2 Mon Sep 17 00:00:00 2001 From: Nam Vu Date: Thu, 18 Jul 2024 10:25:00 +0200 Subject: [PATCH] ci(publish): fix action failure replace unmaintained brandedoutcast/publish-nuget action with CLI commands --- .github/workflows/publish.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2e229b2..ad1a453 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,11 +7,6 @@ on: jobs: publish: runs-on: ubuntu-latest - strategy: - matrix: - package: - - Criteo.OpenApi.Comparator - - Criteo.OpenApi.Comparator.Cli steps: - uses: actions/checkout@v3 - name: Setup .NET Core SDK @@ -20,12 +15,12 @@ jobs: dotnet-version: | 6.x 8.x - - name: Publish ${{ matrix.package }} to NuGet - uses: brandedoutcast/publish-nuget@v2 + - name: Pack + run: dotnet pack -o ./artifacts + - name: Publish + run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} + - uses: actions/upload-artifact@v4 + if: always() with: - PROJECT_FILE_PATH: src/${{ matrix.package }}/${{ matrix.package }}.csproj - BUILD_CONFIGURATION: Release - TAG_COMMIT: true - TAG_FORMAT: v* - NUGET_KEY: ${{secrets.NUGET_API_KEY}} - PACKAGE_NAME: ${{ matrix.package }} + name: nuget-packages + path: ./artifacts/*.nupkg