Skip to content

publish-to-pypi

publish-to-pypi #1

name: publish-to-pypi
# Manual activation
on: [workflow_dispatch]
jobs:
# -- Publish a new Apio release
publish:
runs-on: ubuntu-22.04
steps:
# -- Checkout the main branch
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: master
# -- Install and and configure python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
# -- Install all the dependencies needed
# - name: Install dependencies
# run: |
# make deps
# -- Install dependencies.
- name: Install dependencies
run: python -m pip install --upgrade pip build flit
- name: Build package distributions
run: |
# Creates dist/*.tar.gz and dist/*.whl from pyproject.toml
python -m build
# -- Publish to Pypi!!
- name: Publish to PyPi
env:
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
# invoke publish
flit publish