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

on:
  push:
    tags:
      - "[0-9]+.[0-9]+.[0-9]+"
      - "[0-9]+.[0-9]+.[0-9][a-b][0-9]+"
      - "[0-9]+.[0-9]+.[0-9]rc[0-9]+"

jobs:
  publish:
    runs-on: ubuntu-latest
    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
    - name: Create packages
      run: python -m build -s -w .
    - name: Upload packages
      uses: pypa/gh-action-pypi-publish@v1.1.0
      with:
        user: __token__
        password: ${{ secrets.pypi_password }}