Skip to content

Commit

Permalink
Add Github Actions for Python Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ragnorc committed Apr 12, 2024
1 parent 67b96ee commit 5c332a5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Python package

on:
push:
branches: [ master ]
release:
types: [created]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install Poetry
run: pip install poetry
- name: Build and publish to PyPI
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry build
poetry publish --username __token__ --password $PYPI_API_TOKEN

0 comments on commit 5c332a5

Please sign in to comment.