summaryrefslogtreecommitdiff
path: root/.github/workflows/publish.yml
blob: a40c6cb9712669d828b608cc164f148e37dede2b (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
name: Publish packages to PyPI

on:
  create:
    tags: "*"

jobs:
  publish:
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags/')
    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 build -e .
    - name: Create packages
      run: python -m build -n -s -w .
    - name: Upload packages
      uses: pypa/gh-action-pypi-publish@master
      with:
        user: __token__
        password: ${{ secrets.pypi_password }}