name: flask-rebar Release Publish

on:
  push:
    tags:
      - "v*"

jobs:
  build-n-publish:
    name: Build and publish Python 🐍 distributions 📦 to PyPI
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Set up Python 3.11
      uses: actions/setup-python@v1
      with:
        python-version: 3.11
    - name: Install pep517
      run: |
        python -m pip install pep517 --user
    - name: Build a binary wheel and a source tarball
      run: |
        python -m pep517.build .
    - name: Publish distribution 📦 to PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        password: ${{ secrets.pypi_password }}
