-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (37 loc) · 1.22 KB
/
release.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
name: Release on Version Change
on:
pull_request:
branches: [ main ]
paths:
- "databend_py/VERSION"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Determine Version Change
run: |
export VERSION=$(cat databend_py/VERSION)
- name: Release Package and Tag
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
export VERSION=$(cat databend_py/VERSION)
git config user.name "hantmac"
git config user.email "[email protected]"
git tag -a "v$VERSION" -m "Release Version $VERSION"
git push origin "v$VERSION"
python setup.py sdist bdist_wheel
echo "show user name:"
echo ${{ secrets.TWINE_USERNAME }}
twine upload -u ${{ secrets.TWINE_USERNAME }} -p ${{ secrets.TWINE_PASSWORD }} dist/*