Skip to content

Version 0.2.0

Version 0.2.0 #76

name: "Publish Python 🐍 distributions πŸ“¦ to PyPI"
on:
push:
branches:
- main
pull_request:
release:
types: [published]
jobs:
build:
name: "Build publish Python 🐍 distributions"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: "Set up Python 3.x"
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: "Install pypa/build"
run: >-
python -m
pip install
build
--user
- name: "Build a binary wheel and a source tarball"
run: >-
python -m
build
--outdir dist/
- name: "Upload packages"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages
path: dist
publish:
name: "Publish πŸ“¦ to PyPI"
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packages
- name: "Publish distribution πŸ“¦ to PyPI"
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
with:
skip-existing: true
verbose: true
print-hash: true