Skip to content

Version 1.0.1

Version 1.0.1 #2

# Build and publish the Python SDK to Test PyPI (https://test.pypi.org).
# - Push to main: builds only (activates workflow so "Run workflow" appears).
# - Run workflow: builds and publishes. Requires secret TEST_PYPI_API_TOKEN.
name: Publish to Test PyPI
on:
push:
branches: [main, master]
paths: ['**.py', 'pyproject.toml', 'setup.py', 'setup.cfg', 'MANIFEST.in', 'mcl_platform_sdk/**']
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish to Test PyPI
if: github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
skip-existing: true