35 lines
783 B
YAML
35 lines
783 B
YAML
name: Publish Python Package
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
container: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13.1"
|
|
cache: "pip"
|
|
|
|
- name: Install and configure Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
virtualenvs-create: false
|
|
installer-parallel: true
|
|
|
|
- name: Build package
|
|
run: poetry build
|
|
|
|
- name: Publish to PyPI
|
|
env:
|
|
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
|
|
run: poetry publish --username __token__ --password $POETRY_PYPI_TOKEN_PYPI
|