From f4bb2092681f571ad4c41bd4b6367842194124a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 14 Sep 2022 16:09:29 +0200 Subject: [PATCH] Add support to sign NuGet packages --- build-release.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build-release.sh b/build-release.sh index f718a09..5bc2c57 100755 --- a/build-release.sh +++ b/build-release.sh @@ -108,6 +108,7 @@ godot_version="" templates_version="" build_classical=1 build_mono=1 +sign_nuget=0 publish_nuget=0 while getopts "h?v:t:b:-:" opt; do @@ -139,6 +140,9 @@ while getopts "h?v:t:b:-:" opt; do case "${OPTARG}" in publish-nuget) publish_nuget=1 + if [ $can_sign_windows == 1 ]; then + sign_nuget=1 + fi ;; *) if [ "$OPTERR" == 1 ] && [ "${optspec:0:1}" != ":" ]; then @@ -512,8 +516,13 @@ if [ "${build_mono}" == "1" ]; then cp SHA512-SUMS.txt ${basedir}/sha512sums/${godot_version}/mono/ popd - # NuGet packages - if [ "${publish_nuget}" == "1" ]; then + ## NuGet packages ## + + if [ ${publish_nuget} == 1 ]; then + if [ ${sign_nuget} == 1 ]; then + echo "Signing NuGet packages..." + dotnet nuget sign out/linux/x86_64/tools-mono/GodotSharp/Tools/nupkgs/*.nupkg --certificate-path ${SIGN_KEYSTORE} --timestamper http://timestamp.comodoca.com --certificate-password "${SIGN_PASSWORD}" + fi echo "Publishing NuGet packages..." publish_nuget_packages out/linux/x86_64/tools-mono/GodotSharp/Tools/nupkgs/*.nupkg fi