Skip to content

Commit 9955a5b

Browse files
authored
Merge pull request #14 from pangpang20/master
Add GitHub Actions Workflow for Build & Release, Update Project Metadata, and Publish to PyPI
2 parents fbd4c17 + 9211583 commit 9955a5b

File tree

5 files changed

+72
-21
lines changed

5 files changed

+72
-21
lines changed

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-22.04
14+
15+
steps:
16+
- name: Checkout source
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.9"
23+
24+
- name: Install build tools
25+
run: |
26+
pip install --upgrade pip
27+
pip install --upgrade setuptools wheel build
28+
29+
- name: Build gaussdb
30+
working-directory: gaussdb
31+
run: python -m build
32+
33+
- name: Build gaussdb_pool
34+
working-directory: gaussdb_pool
35+
run: python -m build
36+
37+
- name: Build isort_gaussdb
38+
working-directory: tools/isort-gaussdb
39+
run: python -m build
40+
41+
- name: Show dist dirs content
42+
run: |
43+
ls -l gaussdb/dist/
44+
ls -l gaussdb_pool/dist/
45+
ls -l tools/isort-gaussdb/dist/
46+
47+
- name: Collect all artifacts
48+
run: |
49+
mkdir -p all_dist
50+
cp gaussdb/dist/* all_dist/
51+
cp gaussdb_pool/dist/* all_dist/
52+
cp tools/isort-gaussdb/dist/* all_dist/
53+
ls -ltr all_dist/
54+
55+
- name: Upload all dist/* to GitHub Release
56+
uses: softprops/action-gh-release@v1
57+
with:
58+
files: all_dist/*

gaussdb/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This distribution contains the pure Python package ``gaussdb``.
88
.. Note::
99

1010
Despite the lack of number in the package name, this package is the
11-
successor of psycopg2_.
11+
successor of psycopg2.
1212

1313
Please use the _GaussDB package if you are maintaining an existing program
1414
using _GaussDB as a dependency. If you are developing something new,

gaussdb/pyproject.toml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "gaussdb"
7-
description = "PostgreSQL database adapter for Python"
7+
description = "GaussDB database adapter for Python"
88

99
# STOP AND READ! if you change:
10-
version = "1.0.0.dev1"
10+
version = "1.0.0.dev2"
1111
# also change:
1212
# - `docs/news.rst` to declare this as the current version or an unreleased one;
1313
# - `gaussdb_c/pyproject.toml` to the same version;
14-
# - the `c ` and `binary` "optional-dependencies" below to the same version.
1514
#
1615
# NOTE: you can use `tools/bump_version.py` to maintain versions.
1716

@@ -49,23 +48,17 @@ email = "[email protected]"
4948
text = "GNU Lesser General Public License v3 (LGPLv3)"
5049

5150
[project.urls]
52-
Homepage = "https://gaussdb.org/"
53-
Documentation = "https://gaussdb.org/gaussdb/docs/"
54-
Changes = "https://gaussdb.org/gaussdb/docs/news.html"
55-
Code = "https://github.com/gaussdb/gaussdb"
56-
"Issue Tracker" = "https://github.com/gaussdb/gaussdb/issues"
51+
Homepage = "https://psycopg.org/"
52+
Documentation = "https://psycopg.org/psycopg3/docs/"
53+
Changes = "https://psycopg.org/psycopg3/docs/news.html"
54+
Code = "https://github.com/psycopg/psycopg"
55+
"Issue Tracker" = "https://github.com/psycopg/psycopg/issues"
5756

5857
[project.readme]
5958
file = "README.rst"
6059
content-type = "text/x-rst"
6160

6261
[project.optional-dependencies]
63-
c = [
64-
"gaussdb-c == 1.0.0.dev1; implementation_name != \"pypy\"",
65-
]
66-
binary = [
67-
"gaussdb-binary == 1.0.0.dev1; implementation_name != \"pypy\"",
68-
]
6962
pool = [
7063
"gaussdb-pool",
7164
]

gaussdb_pool/pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ email = "[email protected]"
4444
text = "GNU Lesser General Public License v3 (LGPLv3)"
4545

4646
[project.urls]
47-
Homepage = "https://gaussdb.org/"
48-
Documentation = "https://www.gaussdb.org/gaussdb/docs/advanced/pool.html"
49-
Changes = "https://gaussdb.org/gaussdb/docs/news_pool.html"
50-
Code = "https://github.com/gaussdb/gaussdb"
51-
"Issue Tracker" = "https://github.com/gaussdb/gaussdb/issues"
47+
Homepage = "https://psycopg.org/"
48+
Documentation = "https://www.psycopg.org/psycopg3/docs/advanced/pool.html"
49+
Changes = "https://psycopg.org/psycopg3/docs/news_pool.html"
50+
Code = "https://github.com/psycopg/psycopg"
51+
"Issue Tracker" = "https://github.com/psycopg/psycopg/issues"
5252

5353
[project.readme]
5454
file = "README.rst"

tools/isort-gaussdb/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ Note: because this is the first day I use isort at all, there is a chance that
2626
this plug-in is totally useless and the same can be done using isort features.
2727

2828
.. _isort: https://pycqa.github.io/isort/
29-
.. _gaussdb 3: https://www.gaussdb.org/
29+
.. _gaussdb: https://www.huaweicloud.com/product/gaussdb.html

0 commit comments

Comments
 (0)