Skip to content

modify wf

modify wf #1

Workflow file for this run

name: Publish Python distributions to PyPI
on:
push:
tags:
- "v[0-9]+"
- "v[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+[a-z][0-9]+"
- "v[0-9]+.[0-9]+[a-z][0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+[a-z][0-9]+"
jobs:
build-n-publish:
name: Build and publish Python distributions package to TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install pypa/build
run: |
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}