Skip to content

Commit a369106

Browse files
committed
Download the NuGet package artifact before publishing it
1 parent 3085e16 commit a369106

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
name: Run tests and create NuGet package
1616
outputs:
1717
version: ${{ steps.dotnet-pack.outputs.version }}
18+
nupkg-filename: ${{ steps.dotnet-pack.outputs.nupkg-filename }}
1819
steps:
1920
- uses: actions/checkout@v2
2021
with:
@@ -38,7 +39,10 @@ jobs:
3839
if: startsWith(github.ref, 'refs/tags')
3940
name: Publish package on nuget.org
4041
steps:
41-
- run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
42+
- uses: actions/download-artifact@v2
43+
with:
44+
name: nuget-package-macos-latest
45+
- run: dotnet nuget push ${{ needs.package.outputs.nupkg-filename }} --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
4246
publish-prerelease:
4347
runs-on: macos-latest
4448
needs: package
@@ -51,4 +55,7 @@ jobs:
5155
repo-token: ${{ github.token }}
5256
tag: ${{ needs.package.outputs.version }}
5357
- run: dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text
54-
- run: dotnet nuget push "**/*.nupkg" --source github
58+
- uses: actions/download-artifact@v2
59+
with:
60+
name: nuget-package-macos-latest
61+
- run: dotnet nuget push ${{ needs.package.outputs.nupkg-filename }} --source github

0 commit comments

Comments
 (0)