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

on:
  create:
    tags: "*"

jobs:
  publish:
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags/')
    steps:
    - uses: actions/checkout@v3
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: 3.x
    - name: Install dependencies
      run: pip install flit
    - name: Create packages
      run: flit build --setup-py
    - name: Upload packages
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        password: ${{ secrets.pypi_password }}