Update and rename publish_to_test_pypi.yml to publish_pypi.yml #2
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 π distributions π¦ to PyPI and TestPyPI | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-n-publish: | |
name: Build and publish Python π distributions π¦ to PyPI and TestPyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install pep517 | |
run: >- | |
python -m | |
pip install | |
pep517 | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
pep517.build | |
--source | |
--binary | |
--out-dir dist/ | |
. | |
# - name: Publish distribution π¦ to Test PyPI | |
# uses: pypa/gh-action-pypi-publish@master | |
# with: | |
# password: ${{ secrets.test_pypi_password }} | |
# repository_url: https://test.pypi.org/legacy/ | |
- name: Publish distribution π¦ to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.pypi_password }} |