Skip to content

Commit

Permalink
Add check to ensure that there is only 1 wheel in the target/wheels f…
Browse files Browse the repository at this point in the history
…older
  • Loading branch information
Raunak Bhagat committed Nov 18, 2024
1 parent a5eb023 commit 44ab945
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,16 @@ jobs:
maturin build --release
fi
count=$(ls ~/target/wheels/*.whl 2> /dev/null | wc -l)
if [ "$count" -gt 1 ]; then
echo "Found more than 1 wheel"
exit 1
elif [ "$count" -eq 0 ]; then
echo "Found no wheel files"
exit 1
fi
# Upload wheel
# (there should only be one output wheel in this directory)
for file in ~/target/wheels/*.whl; do
aws s3 cp $file s3://github-actions-artifacts-bucket/builds/${{ inputs.commit || github.sha }}/ --acl public-read --no-progress;
file_basename=$(basename $file)
Expand Down

0 comments on commit 44ab945

Please sign in to comment.