Skip to content

Instantly share code, notes, and snippets.

@gwbischof
Created March 29, 2021 18:44
Show Gist options
  • Save gwbischof/5b93806a49d096b661e7f25317472be5 to your computer and use it in GitHub Desktop.
Save gwbischof/5b93806a49d096b661e7f25317472be5 to your computer and use it in GitHub Desktop.
#!/bin/bash
VERSION=$1
REMOTE=$2
MAIN_BRANCH=$3
echo "Publishing $VERSION"
git commit --allow-empty -m "REL: $VERSION"
git tag -a $VERSION
git push $REMOTE $MAIN_BRANCH
git push $REMOTE $VERSION
python3 -m pip install --upgrade twine
python3 -m pip install --upgrade wheel
git clean -dfx
python3 setup.py sdist
python3 setup.py bdist_wheel
twine upload dist/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment