diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..25fae80b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: publish + +on: + release: + types: [published] + +jobs: + pypi: + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: '3.9' + architecture: 'x64' + - name: Install dependencies + run: | + python -m pip install --progress-bar off --upgrade pip setuptools wheel + python -m pip install --progress-bar off .[build] + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + python -m build + twine upload dist/*