Skip to content

Commit

Permalink
Create python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiah-k committed Oct 12, 2024
1 parent 7db1e63 commit 737c730
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Upload Python Package to PyPI

on:
release:
types: [created]

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build the package
run: python -m build

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: python -m twine upload dist/*

0 comments on commit 737c730

Please sign in to comment.