ci: fix build and pypi publish #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish ${package_name} to PyPI | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
publish-pypi: | |
name: Build and publish to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Build source and wheel distributions | |
run: | | |
virtualenv /tmp/env | |
source /tmp/env/bin/activate | |
XDG_CACHE_HOME=/cache pip3 install -U pip wheel setuptools twine check-manifest build | |
python -m build | |
check-manifest . | |
twine check --strict dist/* | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@ae63f3323ae7b31c08f2805b18056cbf132ce478 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |