name: Build & Publish on: release: types: - created jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Python 3.7 uses: actions/setup-python@v1 with: python-version: 3.7 - name: Update Version run: | pip install bumpversion export regex="([0-9]+.[0-9]+.[0-9]+)" echo ${{ github.ref }} > tag.txt VERSION=`grep -Po "${regex}" tag.txt` bumpversion minor --no-tag --new-version ${VERSION} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: build run: | python setup.py sdist bdist_wheel - name: PyPi Publish uses: pypa/gh-action-pypi-publish@v1.0.0a0 with: user: josephbmanley password: ${{ secrets.PYPI_PASSWORD }}