Skip to content

Publish Python distributions to test-PyPI #1

Publish Python distributions to test-PyPI

Publish Python distributions to test-PyPI #1

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