Skip to content

Publish Python Package to PyPI #12

Publish Python Package to PyPI

Publish Python Package to PyPI #12

name: Publish Python Package to PyPI
on:
push:
tags:
- '*.*.*'
workflow_dispatch:
workflow_run:
workflows: ["Create git tag"]
types:
- completed
permissions:
contents: write
jobs:
build_and_publish:
name: Publish a new version
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Flit
run: |
python -m pip install --upgrade pip
pip install flit
- name: Checkout Repository
uses: actions/checkout@v4
- name: Publish Package to PyPI🚀
env:
FLIT_USERNAME: '__token__'
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
run: |
flit publish