Skip to content

upload release to PyPI #7

upload release to PyPI

upload release to PyPI #7

Workflow file for this run

name: upload release to PyPI
on:
workflow_dispatch:
jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
fetch-tags: 'true'
- uses: actions/[email protected]
with:
python-version: 3.12
- name: Install deps
run: pip install build setuptools_scm
- name: Tag the release
run: |
tag="$(python3 -m setuptools_scm --strip-dev)"
git tag "$tag"
git push origin "$tag"
- name: Build the packages distributions
run: |
python3 -m build . --wheel --sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1