Skip to content

Commit

Permalink
ci: add GitHub Actions workflow for publishing Python package
Browse files Browse the repository at this point in the history
  • Loading branch information
plabaj committed Jan 5, 2025
1 parent 5425a44 commit 90540f0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Python Package

on:
push:
tags:
- "v*.*.*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: poetry install --no-root

- name: Build package
run: poetry build

- name: Publish to PyPI
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: poetry publish --username __token__ --password $PYPI_API_TOKEN

0 comments on commit 90540f0

Please sign in to comment.