Skip to content

Fixing issue #54

Fixing issue #54 #40

name: publish-py-dist-to-test-pypi
on:
push:
branches:
- master
tags:
- '**'
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
# Setup Python
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
# Install Dependencies
- name: Install pypa/build
run: >-
python -m
pip install
build wheel setuptools
--user
# Build Package
- name: Build a binary wheel and a source tarball
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: >-
python
setup.py
bdist_wheel
sdist
# Publish
- name: Publish distribution 📦 to Test PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TEST }}
repository_url: https://test.pypi.org/legacy/