From b06a2a244ca34df2f48b107e3947d3c39d12adea Mon Sep 17 00:00:00 2001 From: Peter Giacomo Lombardo Date: Tue, 11 Apr 2023 16:47:33 +0200 Subject: [PATCH] Github Actions: Fix Nuget Push (#63) --- .github/workflows/build.yml | 41 ++----------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0848a88..d3194285 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,43 +66,6 @@ jobs: - name: "Dotnet Cake Pack" run: dotnet cake --target=Pack shell: pwsh - - name: "Publish Artifacts" - uses: actions/upload-artifact@v3.1.2 - with: - name: ${{matrix.os}} - path: "./Artifacts" - - push-nuget: - name: "Push NuGet Packages" - runs-on: 'ubuntu-latest' - needs: build - if: github.event_name == 'release' - environment: - name: "NuGet" - url: https://www.nuget.org/packages/HiveMQtt - steps: - - name: Push with dotnet + - name: Push to NuGet + if: github.event_name == 'release' run: dotnet nuget push ./Artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate - - - # push-github-packages: - # name: "Push GitHub Packages" - # needs: build - # if: github.ref == 'refs/heads/main' || github.event_name == 'release' - # environment: - # name: "GitHub Packages" - # url: https://github.com/Username/Project/packages - # permissions: - # packages: write - # runs-on: windows-latest - # steps: - # - name: "Download Artifact" - # uses: actions/download-artifact@v3.0.2 - # with: - # name: "windows-latest" - # - name: "Dotnet NuGet Add Source" - # run: dotnet nuget add source https://nuget.pkg.github.com/Username/index.json --name GitHub --username Username --password ${{secrets.GITHUB_TOKEN}} - # shell: pwsh - # - name: "Dotnet NuGet Push" - # run: dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate - # shell: pwsh