blockdiag/sphinxcontrib-actdiag

View on GitHub
.github/workflows/release.yml

Summary

Maintainability
Test Coverage
name: Release a new package

on:
  push:
    tags:
      - '*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.x'
      - name: Install dependencies
        run: pip install docutils setuptools wheel
      - name: Build package
        run: python setup.py sdist bdist_wheel
      - name: Upload package to PyPI
        uses: pypa/gh-action-pypi-publish@master
        if: startsWith(github.ref, 'refs/tags/')
        with:
          user: __token__
          password: ${{ secrets.PYPI_API_TOKEN }}