Add publishing github workflow

This commit is contained in:
Correl Roush 2024-10-20 23:51:25 -04:00
parent 4a5c0507bf
commit 3dae8b3b29

32
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Publish
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/tornado-openapi3/
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Update Poetry configuration
run: poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install --sync --no-interaction
- name: Build package
run: poetry build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1