Skip to content

v2.0.1

v2.0.1 #32

name: Publish to PyPI and TestPyPI
on:
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build
run: >-
python -m pip install build
- name: Run build
run: >-
python -m build .
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
- name: Publish a Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1