Skip to content

Commit

Permalink
Stop specifying .snupkg in nuget push in CI.
Browse files Browse the repository at this point in the history
according to https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg#publishing-a-symbol-package
We should just push `*.nupkg` and `*.snupkg` should get published automatically.
  • Loading branch information
joemphilips committed Aug 18, 2022
1 parent f48e639 commit 4acf845
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
echo "releasing BouncyCastle version to nuget..."
dotnet pack -p:Configuration=Release src/DotNetLightning.Core -p:Portability=True
if [ ${{ secrets.NUGET_API_KEY }} ]; then
dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.${{ steps.get_version.outputs.VERSION }}.snupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.${{ steps.get_version.outputs.VERSION }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
fi
- name: upload release asset (BouncyCastle version)
Expand All @@ -107,8 +107,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.upload-url.outputs.url }}
asset_path: ./src/DotNetLightning.Core/bin/Release/DotNetLightning.${{ steps.get_version.outputs.VERSION }}.snupkg
asset_name: DotNetLightning-multiplatform.${{ steps.get_version.outputs.VERSION }}.snupkg
asset_path: ./src/DotNetLightning.Core/bin/Release/DotNetLightning.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_name: DotNetLightning-multiplatform.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_content_type: application/zip

- name: pack non-BouncyCastle version
Expand All @@ -121,16 +121,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.upload-url.outputs.url }}
asset_path: ./src/DotNetLightning.Core/bin/Release/DotNetLightning.Core.${{ steps.get_version.outputs.VERSION }}.snupkg
asset_name: DotNetLightning-${{ matrix.RID }}.${{ steps.get_version.outputs.VERSION }}.snupkg
asset_path: ./src/DotNetLightning.Core/bin/Release/DotNetLightning.Core.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_name: DotNetLightning-${{ matrix.RID }}.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_content_type: application/zip

- name: Upload nuget packages (DotNetLightning.ClnRpc)
if: startsWith(matrix.os, 'ubuntu')
run: |
dotnet pack -p:Configuration=Release src/DotNetLightning.ClnRpc -p:Portability=True
if [ ${{ secrets.NUGET_API_KEY }} ]; then
dotnet nuget push ./src/DotNetLightning.ClnRpc/bin/Release/DotNetLightning.ClnRpc.${{ steps.get_version.outputs.VERSION }}.snupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
dotnet nuget push ./src/DotNetLightning.ClnRpc/bin/Release/DotNetLightning.ClnRpc.${{ steps.get_version.outputs.VERSION }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
fi
- name: upload release asset (DotNetLightning.ClnRpc)
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -139,8 +139,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.upload-url.outputs.url }}
asset_path: ./src/DotNetLightning.ClnRpc/bin/Release/DotNetLightning.ClnRpc.${{ steps.get_version.outputs.VERSION }}.snupkg
asset_name: DotNetLightning.ClnRpc-multiplatform.${{ steps.get_version.outputs.VERSION }}.snupkg
asset_path: ./src/DotNetLightning.ClnRpc/bin/Release/DotNetLightning.ClnRpc.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_name: DotNetLightning.ClnRpc-multiplatform.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_content_type: application/zip


Expand Down Expand Up @@ -175,16 +175,16 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
run: |
dotnet pack ./src/DotNetLightning.Core -p:Configuration=Release --version-suffix date`date +%Y%m%d-%H%M`-git-`git rev-parse --short=7 HEAD` -p:Portability=True
dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.1*.snupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.1*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
- name: Upload nuget packages (native)
run: |
bash -c "dotnet pack ./src/DotNetLightning.Core -p:Configuration=Release --version-suffix date$(date +%Y%m%d-%H%M).git-$(git rev-parse --short=7 HEAD)-${{ matrix.RID }}"
bash -c "dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.Core.1*.snupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json"
bash -c "dotnet nuget push ./src/DotNetLightning.Core/bin/Release/DotNetLightning.Core.1*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json"
- name: Upload nuget packages (DotNetLightning.ClnRpc)
if: startsWith(matrix.os, 'ubuntu')
run: |
dotnet pack src/DotNetLightning.ClnRpc -p:Configuration=Release --version-suffix date`date +%Y%m%d-%H%M`-git-`git rev-parse --short=7 HEAD` -p:Portability=True
dotnet nuget push ./src/DotNetLightning.ClnRpc/bin/Release/DotNetLightning.ClnRpc.*.snupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
dotnet nuget push ./src/DotNetLightning.ClnRpc/bin/Release/DotNetLightning.ClnRpc.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

0 comments on commit 4acf845

Please sign in to comment.