Skip to content

Commit

Permalink
Add GitHub Action for automatic package publishing to PyPI (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubyndr authored Oct 2, 2024
1 parent f467578 commit 49dcb3f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish to PyPI

on:
workflow_dispatch:
release:
types: [created]

jobs:
build-and-publish:
name: Publish Python distributions to PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
poetry install --no-dev
- name: Package Distribution
run: |
poetry build
- name: Publish Package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 49dcb3f

Please sign in to comment.