Skip to content

py(chore): bump to next version (#75) #5

py(chore): bump to next version (#75)

py(chore): bump to next version (#75) #5

Workflow file for this run

name: Release Python client
on:
push:
tags:
- py-v*
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
env:
FORCE_COLOR: "1"
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=${{ github.workspace }}/.github/workflows/constraints.txt poetry
poetry --version
- name: Check version
working-directory: clients/python
run: |
set -o pipefail
LATEST_TAG=$(git describe --tags --match="py-v*")
if [[ "$LATEST_TAG" =~ $(poetry version | cut -d' ' -f1) ]]; then
echo "::error title='$LATEST_TAG tag does not match project version'::"
exit 1
fi
- name: Build package
working-directory: clients/python
run: |
poetry build --ansi
- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
print-hash: true
packages-dir: clients/python/dist/