forked from eosphoros-ai/DB-GPT-Hub
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.54 KB
/
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
56
name: release
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Cache venv
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-build-${{ matrix.python }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
echo "Cache Version ${{ secrets.CACHE_VERSION }}"
pip install poetry toml-cli
poetry install
poetry config --list
- name: Print tool versions
run: |
poetry run black --version
- name: Build wheels
run: poetry build
- name: Parse version from pyproject.toml
run: echo "DBGPT_HUB_VERSION=`toml get --toml-path pyproject.toml tool.poetry.version`" >> $GITHUB_ENV
- name: Create release note
run: poetry run python release_scripts/release-note.py $(git rev-parse --short HEAD) > RELEASE.md
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*.whl,dist/*.tar.gz"
bodyFile: "RELEASE.md"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
tag: v${{ env.DBGPT_HUB_VERSION }}
commit: ${{ env.GITHUB_SHA }}
- name: Upload wheels
run: poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}