summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy.yml
blob: 12c2039f3854d37e936ac04eeecf5de8f32ae2b1 (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@v3

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

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

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