From 2553f7ad1c3e56fb8f125c3c0da68f1c41127536 Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Thu, 7 Dec 2023 21:38:28 +0200 Subject: [PATCH] Fix release.sh script Refs #1261 --- .github/workflows/release.sh | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.sh b/.github/workflows/release.sh index 095577a04..86b016ab0 100755 --- a/.github/workflows/release.sh +++ b/.github/workflows/release.sh @@ -39,20 +39,22 @@ echo "upload_url=$upload_url" chmod -R -v +x als-*-$DEBUG for CROSS in "" "aarch64" ; do -for X in Linux macOS Windows ; do - FILE=als-$TAG-$X${DEBUG:+-debug}_${CROSS:-amd64}.zip - cd als-$X-$DEBUG$CROSS - zip -9 -r ../$FILE . - cd .. - - # Upload $FILE as an asset to the release - curl \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: token $GITHUB_ACCESS_TOKEN" \ - -H 'Content-Type: application/zip' \ - --data-binary @$FILE \ - $upload_url?name=$FILE - rm -v -f $FILE + for X in Linux macOS Windows ; do + FILE=als-$TAG-$X${DEBUG:+-debug}_${CROSS:-amd64}.zip + if [ -d als-$X-$DEBUG$CROSS ] ; then + cd als-$X-$DEBUG$CROSS + zip -9 -r ../$FILE . + cd .. + + # Upload $FILE as an asset to the release + curl \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: token $GITHUB_ACCESS_TOKEN" \ + -H 'Content-Type: application/zip' \ + --data-binary @$FILE \ + $upload_url?name=$FILE + rm -v -f $FILE + fi + done done -done \ No newline at end of file