Skip to content

Commit

Permalink
Add github action to publish to pypi on tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop committed Dec 19, 2024
1 parent 4510270 commit ab1a889
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pypi_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI

on: push

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10 🐍🐍🐍
uses: actions/setup-python@v1
with:
python-version: 3.10
- name: Install poetry
run: |
python -m pip install poetry
- name: Install dependencies through Poetry
run: |
python -m poetry install --with dev
- name: Publish distribution πŸ“¦ to PyPI
if: startsWith(github.event.ref, 'refs/tags')
env:
PYPI_TOKEN: ${{ secrets.pypi_deploy }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build

0 comments on commit ab1a889

Please sign in to comment.