Skip to content

Commit

Permalink
👷(client) add PyPI publication workflow
Browse files Browse the repository at this point in the history
We want the CLI to be easily installable.
  • Loading branch information
jmaupetit committed Jun 14, 2024
1 parent 8e552b9 commit f26a5b6
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/python-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish python packages

on:
release:
types: [published]

jobs:
release-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/client
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- name: Build release distributions
run: poetry build
- name: Upload dists
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/client
needs:
- release-build
permissions:
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit f26a5b6

Please sign in to comment.