Publish Python distributions to test-PyPI #1
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 test-PyPI | |
on: | |
push: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
deploy-pypi: | |
if: github.repository == 'shry-project/SHRY' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.9' | |
- name: Install pypa/build | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools setuptools_scm wheel | |
python setup.py sdist bdist_wheel | |
- name: Publish distribution to Test PyPI | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_SHRY_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
verbose: true |