Skip to content

Commit 5aa4150

Browse files
author
chenyunliang520
committed
ci: update GitHub Actions workflows for GaussDB
1 parent 5de76c7 commit 5aa4150

File tree

3 files changed

+116
-15
lines changed

3 files changed

+116
-15
lines changed

.github/workflows/release.yml renamed to .github/workflows/release-gaussdb-pool.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
name: Build and Release
1+
---
2+
name: Build and Release gaussdb_pool
23

34
on:
45
push:
56
tags:
6-
- "*"
7+
- "pool-v*.*.*"
78

89
permissions:
910
contents: write
@@ -26,30 +27,18 @@ jobs:
2627
pip install --upgrade pip
2728
pip install --upgrade setuptools wheel build
2829
29-
- name: Build gaussdb
30-
working-directory: gaussdb
31-
run: python -m build
32-
3330
- name: Build gaussdb_pool
3431
working-directory: gaussdb_pool
3532
run: python -m build
3633

37-
- name: Build isort_gaussdb
38-
working-directory: tools/isort-gaussdb
39-
run: python -m build
40-
4134
- name: Show dist dirs content
4235
run: |
43-
ls -l gaussdb/dist/
4436
ls -l gaussdb_pool/dist/
45-
ls -l tools/isort-gaussdb/dist/
4637
4738
- name: Collect all artifacts
4839
run: |
4940
mkdir -p all_dist
50-
cp gaussdb/dist/* all_dist/
5141
cp gaussdb_pool/dist/* all_dist/
52-
cp tools/isort-gaussdb/dist/* all_dist/
5342
ls -ltr all_dist/
5443
5544
- name: Upload all dist/* to GitHub Release
@@ -64,4 +53,4 @@ jobs:
6453
twine upload all_dist/*
6554
env:
6655
TWINE_USERNAME: __token__
67-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
56+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Build and Release gaussdb
3+
4+
on:
5+
push:
6+
tags:
7+
- "v*.*.*"
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.9"
24+
25+
- name: Install build tools
26+
run: |
27+
pip install --upgrade pip
28+
pip install --upgrade setuptools wheel build
29+
30+
- name: Build gaussdb
31+
working-directory: gaussdb
32+
run: python -m build
33+
34+
- name: Show dist dirs content
35+
run: |
36+
ls -l gaussdb/dist/
37+
38+
- name: Collect all artifacts
39+
run: |
40+
mkdir -p all_dist
41+
cp gaussdb/dist/* all_dist/
42+
ls -ltr all_dist/
43+
44+
- name: Upload all dist/* to GitHub Release
45+
uses: softprops/action-gh-release@v1
46+
with:
47+
files: all_dist/*
48+
49+
- name: Upload to PyPI
50+
if: startsWith(github.ref, 'refs/tags/')
51+
run: |
52+
pip install --upgrade twine
53+
twine upload all_dist/*
54+
env:
55+
TWINE_USERNAME: __token__
56+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Build and Release isort-gaussdb
3+
4+
on:
5+
push:
6+
tags:
7+
- "isort-v*.*.*"
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.9"
24+
25+
- name: Install build tools
26+
run: |
27+
pip install --upgrade pip
28+
pip install --upgrade setuptools wheel build
29+
30+
- name: Build isort-gaussdb
31+
working-directory: isort-gaussdb
32+
run: python -m build
33+
34+
- name: Show dist dirs content
35+
run: |
36+
ls -l isort-gaussdb/dist/
37+
38+
- name: Collect all artifacts
39+
run: |
40+
mkdir -p all_dist
41+
cp isort-gaussdb/dist/* all_dist/
42+
ls -ltr all_dist/
43+
44+
- name: Upload all dist/* to GitHub Release
45+
uses: softprops/action-gh-release@v1
46+
with:
47+
files: all_dist/*
48+
49+
- name: Upload to PyPI
50+
if: startsWith(github.ref, 'refs/tags/')
51+
run: |
52+
pip install --upgrade twine
53+
twine upload all_dist/*
54+
env:
55+
TWINE_USERNAME: __token__
56+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)