fix(ci): Process only needed files in publish sizes (#11439)
This commit is contained in:
parent
ee347baa7d
commit
af47bd3008
1 changed files with 10 additions and 9 deletions
19
.github/workflows/publishsizes.yml
vendored
19
.github/workflows/publishsizes.yml
vendored
|
|
@ -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 ..
|
||||
|
|
|
|||
Loading…
Reference in a new issue