Skip to content

Commit

Permalink
Add github action to publish releases on pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
fferflo committed Jan 28, 2024
1 parent fb304c2 commit 3aeb91d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Python Package

on:
release:
types: [published]

jobs:
tests:
uses: ./.github/workflows/run_pytest.yml
deploy:
needs: [tests]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

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

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 3aeb91d

Please sign in to comment.