-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (45 loc) · 1.37 KB
/
build_and_upload_release.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: build_and_upload_release
on:
release:
types:
- published
jobs:
build:
name: build and upload release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v5
- name: setup poetry
run: |
python -m pip install --upgrade pip poetry
- name: setup Bun
run: npm install -g bun
- name: build frontend
run: |
bun install
bun run build
cp -r ./dist/* ../backend/chatsky_ui/static
working-directory: frontend
- name: build wheels and test uploading to pypi
if: startsWith(github.ref, 'refs/tags/v') != true
run: |
python -m poetry --build publish --dry-run
working-directory: backend
- name: build wheels and upload to pypi
if: startsWith(github.ref, 'refs/tags/v')
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
python -m poetry --build publish
working-directory: backend
- name: upload binaries into release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: backend/dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true