Skip to content

Upload Python Package #6

Upload Python Package

Upload Python Package #6

name: Upload Python Package
on:
release:
types: [published]
workflow_dispatch: # Enable manual trigger
permissions:
contents: read
jobs:
deploy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
- name: Install dependencies
run: |
export PATH="$HOME/.local/bin:$PATH"
poetry install --no-dev
- name: Build package
run: |
export PATH="$HOME/.local/bin:$PATH"
poetry build
- name: Publish package
run: |
export PATH="$HOME/.local/bin:$PATH"
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}