1.3.0 #135
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: | |
release: | |
types: [published] | |
permissions: read-all | |
jobs: | |
ci: | |
uses: ./.github/workflows/ci.yaml | |
secrets: inherit | |
build-n-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: [ci] | |
env: | |
name: pypi | |
url: https://pypi.org/p/chainlit | |
BACKEND_DIR: ./backend | |
permissions: | |
contents: read | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/pnpm-node-install | |
name: Install Node, pnpm and dependencies. | |
with: | |
node-version: 22.7.0 | |
pnpm-version: 9.7.0 | |
pnpm-install-args: --no-frozen-lockfile | |
- uses: ./.github/actions/poetry-python-install | |
name: Install Python, poetry and Python dependencies | |
with: | |
python-version: 3.9 | |
poetry-version: 1.8.3 | |
poetry-working-directory: ${{ env.BACKEND_DIR }} | |
- name: Copy readme to backend | |
run: cp README.md backend/ | |
- name: Build chainlit | |
run: pnpm run build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: backend/dist | |
password: ${{ secrets.PYPI_API_TOKEN }} |