update server api to work with chatbotui #12
Workflow file for this run
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 | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
name: Build SDist and Wheel | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
- name: Install dependencies | |
run: | | |
python -m pip install twine --upgrade | |
- name: Build sdist | |
run: | | |
python setup.py sdist | |
- name: Build wheel | |
run: | | |
python setup.py bdist_wheel | |
- name: Check metadata | |
run: | | |
twine check --strict dist/* | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist/* | |
upload_all: | |
name: Upload if release | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verbose: true | |
password: ${{ secrets.PYPI_API_TOKEN }} |