dwhswenson/contact_map

View on GitHub
.github/workflows/autorelease-deploy.yml

Summary

Maintainability
Test Coverage
name: Autorelease
on:
  release:
    types: [published]

jobs:
  deploy_pypi:
    runs-on: ubuntu-latest
    name: "Deploy to PyPI"
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: "3.x"
      - run: |  # TODO: move this to an action
          source ./.github/workflows/autorelease-default-env.sh
          if [ -f "autorelease-env.sh" ]; then
            cat autorelease-env.sh >> $GITHUB_ENV
          fi
          eval $INSTALL_AUTORELEASE
        name: "Install autorelease"
      - run: |
          python -m pip install twine wheel
        name: "Install release tools"
      - run: |
          python setup.py sdist bdist_wheel
          twine check dist/*
        name: "Build and check package"
      - uses: pypa/gh-action-pypi-publish@master
        with:
          password: ${{ secrets.pypi_password }}
        name: "Deploy to pypi"