Skip to content

Publish Python Distributions to TestPyPI #114

Publish Python Distributions to TestPyPI

Publish Python Distributions to TestPyPI #114

name: Publish Python Distributions to TestPyPI
# Controls when the workflow will run
on:
workflow_run:
workflows: [Test Installs]
types:
- completed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-n-publish:
name: Build and publish python distributions to TestPyPI
runs-on: ubuntu-latest
concurrency: release
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@master
with:
ref: 'test_release'
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Install teaspoon for testing
run: pip install ".[full]"
- name: Run tests
run: make tests
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TEST }}
repository_url: https://test.pypi.org/legacy/