Skip to content

TestPyPI

TestPyPI #3

Workflow file for this run

name: TestPyPI
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: 'https://test.pypi.org/legacy/'
jobs:
build-and-publish:
name: Build and publish to TestPyPI
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install twine
run: |
pip install --upgrade pip wheel setuptools
pip install twine
python --version
pip --version
twine --version
- name: Create source distribution
run: |
python setup.py sdist --dist-dir wheelhouse
- name: Upload source distribution
run: |
twine upload --skip-existing wheelhouse/*.tar.gz