Skip to content

Commit

Permalink
ci: Push wheels to S3
Browse files Browse the repository at this point in the history
  • Loading branch information
kmurphy4 committed Oct 23, 2024
1 parent e55517c commit 776dcb4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ jobs:
python3 -m build --outdir=dist --wheel
python3 -m pip install --no-index --find-links=dist pypff-stubs
mypy --strict -c 'import pypff; reveal_type(pypff.file)'
- name: Upload wheels
run: |
./upload-wheel.sh dist/libpff_python*.whl
./upload-wheel.sh stubs/dist/pypff_stubs*.whl
14 changes: 14 additions & 0 deletions upload-wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -euo pipefail

wheel="$1"
url="s3://everlaw-build-artifacts/libpff/$(basename "$wheel")"

if aws s3 ls "$url" &>/dev/null; then
>&2 echo "$url already exists!"
exit 0
fi

aws s3 cp --only-show-errors "$wheel" "$url"
>&2 echo "Uploaded $url"

0 comments on commit 776dcb4

Please sign in to comment.