Skip to content

Version 1.0.1

Version 1.0.1 #2

Workflow file for this run

# Build and publish the Python SDK to PyPI.
# - Push to main: builds only (activates workflow so "Run workflow" appears).
# - Release published or Run workflow: builds and publishes. Requires secret PYPI_API_TOKEN.
name: Publish to PyPI
on:
push:
branches: [main, master]
paths: ['**.py', 'pyproject.toml', 'setup.py', 'setup.cfg', 'MANIFEST.in', 'mcl_platform_sdk/**']
release:
types: [published]
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
id-token: write
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 PyPI
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true