chore: skip ota build for empty pack

This commit is contained in:
Horror Proton
2023-03-09 12:05:06 +08:00
parent d92e77fcce
commit b16369f9e6

View File

@@ -13,12 +13,15 @@ script_dir="$(dirname $(realpath "$0"))"
latest_tag=$(head -n 1 "$releases_txt")
while read tag; do
echo "::group::$tag"
if [ ! -d "$tag"/content ]; then
mkdir -pv "$tag"
cd "$tag"
echo "Downloading $tag"
gh release download "$tag" --repo $source_repo --pattern "MAA-$tag-win-$arch.zip" --clobber \
|| gh release download "$tag" --repo $source_repo_fallback --pattern "MAA-$tag-win-$arch.zip" --clobber
|| gh release download "$tag" --repo $source_repo_fallback --pattern "MAA-$tag-win-$arch.zip" --clobber \
|| { echo "::warning:: win $arch not found in release $tag skipping."; echo "::endgroup::"; continue; }
mkdir -pv 'content'
unzip -q -O GB2312 -o "*.zip" -d 'content'
rm -fv *.zip
@@ -40,5 +43,7 @@ while read tag; do
zip -q -9 -r "$working_dir"/"MAAComponent-OTA-${tag}_${latest_tag}-win-$arch.zip" .
cd $working_dir
fi
echo "::endgroup::"
done < "$releases_txt"