Skip to content

Commit b06a2a2

Browse files
authored
Github Actions: Fix Nuget Push (#63)
1 parent 96f635a commit b06a2a2

File tree

1 file changed

+2
-39
lines changed

1 file changed

+2
-39
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -66,43 +66,6 @@ jobs:
6666
- name: "Dotnet Cake Pack"
6767
run: dotnet cake --target=Pack
6868
shell: pwsh
69-
- name: "Publish Artifacts"
70-
uses: actions/[email protected]
71-
with:
72-
name: ${{matrix.os}}
73-
path: "./Artifacts"
74-
75-
push-nuget:
76-
name: "Push NuGet Packages"
77-
runs-on: 'ubuntu-latest'
78-
needs: build
79-
if: github.event_name == 'release'
80-
environment:
81-
name: "NuGet"
82-
url: https://www.nuget.org/packages/HiveMQtt
83-
steps:
84-
- name: Push with dotnet
69+
- name: Push to NuGet
70+
if: github.event_name == 'release'
8571
run: dotnet nuget push ./Artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
86-
87-
88-
# push-github-packages:
89-
# name: "Push GitHub Packages"
90-
# needs: build
91-
# if: github.ref == 'refs/heads/main' || github.event_name == 'release'
92-
# environment:
93-
# name: "GitHub Packages"
94-
# url: https://github.com/Username/Project/packages
95-
# permissions:
96-
# packages: write
97-
# runs-on: windows-latest
98-
# steps:
99-
# - name: "Download Artifact"
100-
# uses: actions/[email protected]
101-
# with:
102-
# name: "windows-latest"
103-
# - name: "Dotnet NuGet Add Source"
104-
# run: dotnet nuget add source https://nuget.pkg.github.com/Username/index.json --name GitHub --username Username --password ${{secrets.GITHUB_TOKEN}}
105-
# shell: pwsh
106-
# - name: "Dotnet NuGet Push"
107-
# run: dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate
108-
# shell: pwsh

0 commit comments

Comments
 (0)