Disable push to reakl PyPI for initial test #1
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 Python package to PyPI | |
on: | |
# Action currently disabled to only push to TestPyPI for now | |
#push: | |
# tags: | |
# - '*' | |
jobs: | |
publish: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') # Only run on tagged commits | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install pypa/build/setuptools/twine | |
run: >- | |
python3 -m | |
pip install | |
build setuptools twine | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: python3 -m build | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: twine upload dist/* | |