From 5f2268f67cc5de66d9a6b58d78c57253ce4cae8f Mon Sep 17 00:00:00 2001 From: Hadrian Tang Date: Wed, 5 Aug 2020 16:02:07 +0800 Subject: [PATCH 1/3] Fix GitHub Packages --- .github/workflows/Test.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 304609e9..bbd06ce4 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -88,16 +88,23 @@ jobs: - name: Push CI artifacts to GitHub Packages registry if: github.ref == 'refs/heads/master' run: | - # Non-Windows platforms require --store-password-in-clear-text: https://github.com/NuGet/Home/issues/1851 - dotnet nuget add source https://nuget.pkg.github.com/verybadcat/index.json -n github -u verybadcat -p ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text - for x in `ls .nupkgs/*.nupkg` # Don't let GitHub Releases interpret .snupkg as .nupkg - do - # The GitHub Package registry does not support .snupkg files so we specify --no-symbols - # Use --skip-duplicate since we want re-runs of this workflow to succeed in case of network issues - dotnet nuget push $x --no-symbols --source "github" --skip-duplicate - done - # Following command does not work... https://github.com/NuGet/Home/issues/9867 - # dotnet nuget push .nupkgs/*.nupkg --no-symbols --source "github" --skip-duplicate # Don't let GitHub Releases interpret .snupkg as .nupkg + # dotnet nuget push to GitHub Packages in unstable: https://github.com/NuGet/Home/issues/9775 + # So someone wrote a .NET Core tool to workaround this: https://github.com/NuGet/Home/issues/9775#issuecomment-660947350 + # Currently this tool will never return a non-0 exit code: https://github.com/jcansdale/gpr/issues/69 (nice) + dotnet tool install -g gpr + gpr push .nupkgs/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} + + # Original code before using this tool: + # # Non-Windows platforms require --store-password-in-clear-text: https://github.com/NuGet/Home/issues/1851 + # dotnet nuget add source https://nuget.pkg.github.com/verybadcat/index.json -n github -u verybadcat -p ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text + # for x in `ls .nupkgs/*.nupkg` # Don't let GitHub Releases interpret .snupkg as .nupkg + # do + # # The GitHub Package registry does not support .snupkg files so we specify --no-symbols + # # Use --skip-duplicate since we want re-runs of this workflow to succeed in case of network issues + # dotnet nuget push $x --source "github" --skip-duplicate --no-symbols + # done + # # Following command does not work... https://github.com/NuGet/Home/issues/9867 + # # dotnet nuget push .nupkgs/*.nupkg --source "github" --skip-duplicate --no-symbols # Don't let GitHub Releases interpret .snupkg as .nupkg Ios: runs-on: macos-latest steps: From 9793dc8dd3c3f6d4e3b5b003139b4b2cefd5794c Mon Sep 17 00:00:00 2001 From: Hadrian Tang Date: Wed, 5 Aug 2020 16:03:46 +0800 Subject: [PATCH 2/3] Grammar --- .github/workflows/Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index bbd06ce4..bf1f6029 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -88,7 +88,7 @@ jobs: - name: Push CI artifacts to GitHub Packages registry if: github.ref == 'refs/heads/master' run: | - # dotnet nuget push to GitHub Packages in unstable: https://github.com/NuGet/Home/issues/9775 + # dotnet nuget push to GitHub Packages is unstable for project names with a dot: https://github.com/NuGet/Home/issues/9775 # So someone wrote a .NET Core tool to workaround this: https://github.com/NuGet/Home/issues/9775#issuecomment-660947350 # Currently this tool will never return a non-0 exit code: https://github.com/jcansdale/gpr/issues/69 (nice) dotnet tool install -g gpr From 321a1be1a4cbc22a161969fd7cf9662c859e84cb Mon Sep 17 00:00:00 2001 From: Hadrian Tang Date: Wed, 5 Aug 2020 16:06:21 +0800 Subject: [PATCH 3/3] Update Test.yml --- .github/workflows/Test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index bf1f6029..15b54f8b 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -91,6 +91,7 @@ jobs: # dotnet nuget push to GitHub Packages is unstable for project names with a dot: https://github.com/NuGet/Home/issues/9775 # So someone wrote a .NET Core tool to workaround this: https://github.com/NuGet/Home/issues/9775#issuecomment-660947350 # Currently this tool will never return a non-0 exit code: https://github.com/jcansdale/gpr/issues/69 (nice) + # But we must not include .snupkg files in globbing or a duplicate version error will occur: https://github.com/jcansdale/gpr/issues/83 dotnet tool install -g gpr gpr push .nupkgs/*.nupkg -k ${{ secrets.GITHUB_TOKEN }}