#!/usr/bin/env bash
#
# Upload Python package to PyPI using twine.

set -o errexit
set -o pipefail
set -o nounset

# Check if the package was built beforehand.
if [ ! -d "dist" ]; then
  echo "Run 'script/build' first."
  exit 1
fi

echo "Uploading package to PyPI using twine..."
python3 -m twine upload dist/*

# TestPyPI repository
# python3 -m twine upload --repository testpypi dist/*
