summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy.yml
blob: e5e4f1dd4cdc40b1002d988eb369c5e08b7ebdee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Deploy

# Only run on tagged commits
on:
  push:
    tags:
      - "*"

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9

      - name: Build Source Distribution and Wheel
        run: |
          pip install wheel
          python setup.py sdist --format=gztar bdist_wheel

      - name: Publish to PyPI
        uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.pypi_token_password }}