Publish Python Wrapper Client #25
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 Wrapper Client | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract docs version | |
working-directory: ./clients/python-wrapper/ | |
shell: bash | |
run: | | |
echo "tag=$(python setup.py --version)" >> $GITHUB_OUTPUT | |
id: docver | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
cache-dependency-path: 'clients/python-wrapper/requirements.txt' | |
- name: Generate and Build Documentation | |
run: | | |
pip install -r clients/python-wrapper/requirements.txt | |
make python-wrapper-gen-docs | |
- name: Publish to Docs Repository | |
uses: dmnemec/[email protected] | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.PERSONAL_TOKEN }} | |
with: | |
source_file: clients/python-wrapper/_site/. | |
destination_repo: treeverse/docs-lakefs-sdk-python-wrapper | |
destination_folder: / | |
user_email: '[email protected]' | |
user_name: 'python-docs-action' | |
- name: Python Build and Make Package | |
run: make package-python-wrapper | |
- name: Publish Distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages-dir: clients/python-wrapper/dist/ | |
verbose: true | |