diff --git a/.github/workflows/publishsizes.yml b/.github/workflows/publishsizes.yml index 69c18cf1835..8ff591e052b 100644 --- a/.github/workflows/publishsizes.yml +++ b/.github/workflows/publishsizes.yml @@ -44,16 +44,17 @@ jobs: gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact do IFS=$'\t' read name url <<< "$artifact" - gh api $url > "$name.zip" - unzip -j "$name.zip" -d "temp_$name" - if [[ "$name" == "pr_number" ]]; then - mv "temp_$name"/* sizes-report - elif [[ "$name" == "pr_cli"* ]]; then - mv "temp_$name"/* sizes-report/pr - else - mv "temp_$name"/* sizes-report + # Only process pr_number and pr_cli_compile artifacts + if [[ "$name" == "pr_number" || "$name" =~ ^pr_cli_compile_[0-9]+$ ]]; then + gh api $url > "$name.zip" + unzip -o -j "$name.zip" -d "temp_$name" + if [[ "$name" == "pr_number" ]]; then + mv "temp_$name"/* sizes-report + elif [[ "$name" =~ ^pr_cli_compile_[0-9]+$ ]]; then + mv "temp_$name"/* sizes-report/pr + fi + rm -r "temp_$name" fi - rm -r "temp_$name" done echo "Contents of parent directory:" ls -R ..