Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
chore: Update build and upload scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sweetbrulee committed Jul 21, 2024
1 parent 3819b7b commit c12d5e1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ pip install wheel
Generate the distribution files:

```sh
rm -rf build/ dist/
python setup.py sdist bdist_wheel
. scripts/build.sh
```

#### Publish the package to PyPI
Expand All @@ -106,7 +105,7 @@ pip install twine
Upload the distribution files to PyPI:

```sh
twine upload dist/*
. scripts/upload.sh
```

## TODO
Expand Down
4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm -rf build/ dist/;
python setup.py sdist bdist_wheel;
10 changes: 10 additions & 0 deletions scripts/upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Check if the PYPI_API_TOKEN environment variable is set
if [ -z "$PYPI_API_TOKEN" ]; then
echo "Error: PYPI_API_TOKEN environment variable is not set."
exit 1
fi

# Use twine to upload the package
twine upload --username __token__ --password "$PYPI_API_TOKEN" dist/*

0 comments on commit c12d5e1

Please sign in to comment.