Skip to content

revamp

revamp #161

Workflow file for this run

name: Python SDK release
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
skip-test:
description: 'Skip test'
required: false
type: string
default: "false"
jobs:
pip:
name: Publish to Pip
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./python-sdk
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9.23"
- name: Install pypa/build
run: python -m pip install build --user
- name: Install deps
run: pip install -r requirements.txt
- name: Install tests deps
run: pip install -r test-requirements.txt
- name: Test with pytest
run: ./run-tests.sh
- name: Build a binary wheel and a source tarball
env:
VERSION: ${{ github.ref_name }}
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
packages-dir: python-sdk/dist