Created
January 18, 2022 18:13
-
-
Save uselessgoddess/54e286dbda22935313615d65723e7670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # Exit with nonzero exit code if anything fails | |
sudo apt-get install nuget | |
CPP_PACKAGE_NUSPEC_PATH=$(<CPP_PACKAGE_NUSPEC_PATH.txt) | |
CPP_PACKAGE_NUSPEC_DIRECTORY=$(dirname "$CPP_PACKAGE_NUSPEC_PATH") | |
CPP_PACKAGE_VERSION=$(<CPP_PACKAGE_VERSION.txt) | |
# Download icon.png for the package | |
wget -O "$CPP_PACKAGE_NUSPEC_DIRECTORY/icon.png" https://raw.githubusercontent.com/linksplatform/Documentation/18469f4d033ee9a5b7b84caab9c585acab2ac519/doc/Avatar-rainbow-icon-64x64.png | |
# Download TemplateLibrary.targets for the package | |
wget -O "$CPP_PACKAGE_NUSPEC_DIRECTORY/Platform.$REPOSITORY_NAME.TemplateLibrary.targets" https://raw.githubusercontent.com/linksplatform/Files/ed0dc702f52d56d80ea2f19c93df5cf2fdcbccbf/TemplateLibrary.targets | |
# Pack NuGet package | |
nuget pack "$CPP_PACKAGE_NUSPEC_PATH" | |
# Push NuGet package | |
nuget push ./**/*.nupkg -NoSymbols -SkipDuplicate -Source https://api.nuget.org/v3/index.json -ApiKey "${NUGETTOKEN}" | |
# Clean up | |
find . -type f -name '*.nupkg' -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment