Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitHub Packages #157

Merged
merged 3 commits into from
Aug 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,24 @@ 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 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 }}

# 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:
Expand Down