diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c59f4f1..7e6fedb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,8 +26,11 @@ jobs: 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 }} --upload-demo --no-upload-source --hf-token=${{ secrets.HF_TOKEN }} + - 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 }} diff --git a/pyproject.toml b/pyproject.toml index fe41eb2..38e13b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ build-backend = "hatchling.build" [project] name = "gradio_imageslider" version = "0.0.18" + description = """ A Gradio component for comparing two images. @@ -18,6 +19,7 @@ This component can be used in several ways: - as a **manual upload input** allowing users to compare two of their own images (which can then be passed along elsewhere, e.g. to a model), - as **static output component** allowing users to compare two images generated by an inference function. """ + license = "Apache-2.0" requires-python = ">=3.8" authors = [{ name = "pngwn", email = "hello@pngwn.io" }] @@ -49,14 +51,7 @@ classifiers = [ repository = "https://github.com/pngwn/gradio-imageslider" [tool.hatch.build] -artifacts = [ - "backend/gradio_imageslider/boo", - "*.pyi", - "backend/gradio_imageslider/templates", - "backend/gradio_imageslider/templates", - "backend/gradio_imageslider/templates", - "backend/gradio_imageslider/templates", -] +artifacts = ["backend/gradio_imageslider/boo", "*.pyi", "backend/gradio_imageslider/templates"] [tool.hatch.build.targets.wheel] packages = ["backend/gradio_imageslider"] diff --git a/requirement.txt b/requirement.txt new file mode 100644 index 0000000..da0ab4e --- /dev/null +++ b/requirement.txt @@ -0,0 +1 @@ +gradio \ No newline at end of file