fix workflow #9
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 pypi package | |
on: | |
push: | |
branches: | |
- main | |
# paths-ignore: | |
# - "pyproject.toml" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: pnpm | |
cache-dependency-path: frontend/pnpm-lock.yaml | |
- name: Install gradio | |
run: python -m pip install gradio build twine | |
- name: Build pr package | |
run: | | |
gradio cc install --npm-install="pnpm i" | |
gradio cc build | |
gradio cc publish --pypi-username=__token__ --pypi-password=${{ secrets.PYPI_API_TOKEN }} --no-upload-demo |