da14fb3a42
Bumps the actions-deps group with 1 update: [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/setup-python` from 6 to 7 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions-deps ... Signed-off-by: dependabot[bot] <support@github.com>
36 lines
885 B
YAML
36 lines
885 B
YAML
name: Publish on PyPI
|
|
on: [push, workflow_dispatch, workflow_call]
|
|
jobs:
|
|
build:
|
|
name: Build distributions
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: "3.x"
|
|
- run: pip install build
|
|
- run: python -m build
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: build
|
|
path: dist/
|
|
publish-to-pypi:
|
|
name: Publish distributions to PyPI
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
needs:
|
|
- build
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
pattern: build
|
|
path: dist/
|
|
merge-multiple: true
|
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|