update workflows #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Python distribution to PyPI | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
- main | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- v0.* | |
jobs: | |
build-n-publish: | |
if: startsWith(github.ref, 'refs/tags') | |
name: Build and publish Python distributions to PyPI | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.GH_PYPI_TOKEN }} | |
run: | | |
make publish |