Publish python packages #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Install poetry | |
run: pipx install poetry | |
- 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: src/client/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: src/client/dist/ | |
- name: Publish release distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |