1#!/bin/sh -e23VERSION_FILE="httpx/__version__.py"45if [ -d 'venv' ] ; then6 PREFIX="venv/bin/"7else8 PREFIX=""9fi1011if [ ! -z "$GITHUB_ACTIONS" ]; then12 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"13 git config --local user.name "GitHub Action"1415 VERSION=`grep __version__ ${VERSION_FILE} | grep -o '[0-9][^"]*'`1617 if [ "refs/tags/${VERSION}" != "${GITHUB_REF}" ] ; then18 echo "GitHub Ref '${GITHUB_REF}' did not match package version '${VERSION}'"19 exit 120 fi21fi2223set -x2425${PREFIX}twine upload dist/*26${PREFIX}mkdocs gh-deploy --force