Skip to content

Workflow file for this run

name: Publish Python mloptimizer to PyPI and TestPyPI
on:
release:
types: [published]
permissions:
contents: read
jobs:
release-build:
name: Build and publish Python mloptimizer to PyPI and TestPyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/mloptimizer/
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pypa/build
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish mloptimizer to PyPI
# if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}