summaryrefslogtreecommitdiff
path: root/.github/workflows/pypi-publish.yaml
blob: b842c36670b1e6fa9356f5b303596558eacbbc62 (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: Publish tag to Pypi

on:
  release:
    types: [published]

jobs:

  build_and_package:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: install python
        uses: actions/setup-python@v2
        with:
          python-version: 3.0
      - name: Install dev tools
        run: |
          pip install -r dev_requirements.txt
          pip install twine wheel

      - name: Build package
        run: |
          python setup.py build
          python setup.py dist bdist_wheel

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