-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (34 loc) · 1.01 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Publish pypi package
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
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
- run: gradio cc install --npm-install="pnpm i"
- run: gradio cc docs
- run: gradio cc build --no-generate-docs
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- run: gradio cc publish --no-upload-pypi --upload-demo --no-upload-source --hf-token=${{ secrets.HF_TOKEN }}