-
Notifications
You must be signed in to change notification settings - Fork 1.1k
50 lines (48 loc) · 1.3 KB
/
publish.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Publish
on:
workflow_dispatch:
release:
types: [published]
jobs:
tests:
uses: ./.github/workflows/tests.yaml
secrets: inherit
build-n-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: [tests]
env:
name: pypi
url: https://pypi.org/p/chainlit
permissions:
contents: read
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
with:
ref: main
- uses: pnpm/action-setup@v2
with:
version: 8.6.9
- name: Use Node.js 16.15.0
uses: actions/setup-node@v3
with:
node-version: '16.15.0'
cache: 'pnpm'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Copy readme to backend
run: cp README.md backend/
- name: Install JS dependencies
run: pnpm install --no-frozen-lockfile
- 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 }}