Skip to content

Merge pull request #882 from aboutcode-org/update-github-workflows #68

Merge pull request #882 from aboutcode-org/update-github-workflows

Merge pull request #882 from aboutcode-org/update-github-workflows #68

name: Build minecode-pipeline Python distributions and publish on PyPI
on:
workflow_dispatch:
push:
tags:
- "minecode-pipelines/*"
jobs:
build-and-publish:
permissions:
id-token: write
name: Build and publish library to PyPI
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.13
- name: Install flot
run: python -m pip install flot --user
- name: Build binary wheel and source tarball
run: python -m flot --pyproject pyproject-minecode_pipelines.toml --sdist --wheel --output-dir dist/
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
- name: Upload built archives
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: pypi_archives
path: dist/*