Skip to content

Commit

Permalink
Github Actions: Fix Nuget Push (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo authored Apr 11, 2023
1 parent 96f635a commit b06a2a2
Showing 1 changed file with 2 additions and 39 deletions.
41 changes: 2 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,43 +66,6 @@ jobs:
- name: "Dotnet Cake Pack"
run: dotnet cake --target=Pack
shell: pwsh
- name: "Publish Artifacts"
uses: actions/[email protected]
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/[email protected]
# 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

0 comments on commit b06a2a2

Please sign in to comment.