|
|
|
|
@ -10,6 +10,9 @@ jobs:
|
|
|
|
|
build-n-publish: |
|
|
|
|
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
environment: pypi |
|
|
|
|
permissions: |
|
|
|
|
id-token: write |
|
|
|
|
if: ((github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || contains(github.event.pull_request.labels.*.name, 'Build wheels')) |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
@ -18,7 +21,7 @@ jobs:
|
|
|
|
|
fetch-depth: 0 |
|
|
|
|
- uses: actions/setup-python@v5 |
|
|
|
|
with: |
|
|
|
|
python-version: 3.8 |
|
|
|
|
python-version: "3.13" |
|
|
|
|
|
|
|
|
|
- name: Install python-build and twine |
|
|
|
|
run: python -m pip install build twine |
|
|
|
|
@ -34,7 +37,4 @@ jobs:
|
|
|
|
|
|
|
|
|
|
- name: Publish distribution 📦 to PyPI |
|
|
|
|
if: startsWith(github.ref, 'refs/tags') |
|
|
|
|
uses: pypa/gh-action-pypi-publish@master |
|
|
|
|
with: |
|
|
|
|
user: __token__ |
|
|
|
|
password: ${{ secrets.pypi_password }} |
|
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1 |
|
|
|
|
|