gradio/.github/workflows/deploy-client-pypi.yml
renovate[bot] 4a0e387e7b
chore(deps): update pypa/gh-action-pypi-publish digest to 3be882c (#4600)
* chore(deps): update pypa/gh-action-pypi-publish digest to 3be882c

* fix action version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2023-06-23 14:56:08 +01:00

41 lines
1.3 KiB
YAML

# This workflow will upload a Python Package when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Gradio Client Python Package
on:
workflow_dispatch:
pull_request:
types: closed
branches:
- main
paths:
- 'client/python/gradio_client/version.txt'
jobs:
deploy:
if: github.event.pull_request.merged == true || github.event.action == ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Check new pypi version
run: python client/python/scripts/check_pypi.py
- name: Build pypi package
run: |
client/python/scripts/build_pypi.sh
- name: Publish package
uses: pypa/gh-action-pypi-publish@3be882c473b35162143effc2be2455999c59fc06
with:
user: __token__
password: ${{ secrets.PYPI_GRADIO_CLIENT_TOKEN }}
packages_dir: client/python/dist