Skip to content

Commit

Permalink
(#3) paralax: add apckage signing
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Sep 18, 2024
1 parent 57a3238 commit af95d64
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/Paralax/scripts/build-and-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,31 @@ echo "Package created for branch $GITHUB_REF_NAME"

case "$GITHUB_REF_NAME" in
"dev")
echo "Uploading Paralax package to NuGet..."
echo "Preparing to sign the package for NuGet upload..."
PACKAGE_PATH="./nupkg/Paralax.$PACKAGE_VERSION.nupkg"

if [ -f "$PACKAGE_PATH" ]; then
echo "Package found: $PACKAGE_PATH"
dotnet nuget push "$PACKAGE_PATH" -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json
echo "Package uploaded to NuGet."

echo "Signing the package..."
signtool sign /fd SHA256 /a /t http://timestamp.digicert.com /v "$PACKAGE_PATH"

if [ $? -eq 0 ]; then
echo "Package successfully signed."

echo "Uploading the signed Paralax package to NuGet..."
dotnet nuget push "$PACKAGE_PATH" -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json

if [ $? -eq 0 ]; then
echo "Package uploaded to NuGet."
else
echo "Error uploading the package to NuGet."
exit 1
fi
else
echo "Error signing the package."
exit 1
fi
else
echo "Error: Package $PACKAGE_PATH not found."
exit 1
Expand Down

0 comments on commit af95d64

Please sign in to comment.