Skip to content

Create python-publish.yml #6

Create python-publish.yml

Create python-publish.yml #6

name: Upload Python Package
# on:
# release:
# types: [published]
on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install poetry
- name: Build the package
run: |
poetry check
poetry build
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: poetry publish --username __token__ --password $PYPI_API_TOKEN