diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..985273cfe --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,58 @@ +name: Build and Release + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.9" + + - name: Install build tools + run: | + pip install --upgrade pip + pip install --upgrade setuptools wheel build + + - name: Build gaussdb + working-directory: gaussdb + run: python -m build + + - name: Build gaussdb_pool + working-directory: gaussdb_pool + run: python -m build + + - name: Build isort_gaussdb + working-directory: tools/isort-gaussdb + run: python -m build + + - name: Show dist dirs content + run: | + ls -l gaussdb/dist/ + ls -l gaussdb_pool/dist/ + ls -l tools/isort-gaussdb/dist/ + + - name: Collect all artifacts + run: | + mkdir -p all_dist + cp gaussdb/dist/* all_dist/ + cp gaussdb_pool/dist/* all_dist/ + cp tools/isort-gaussdb/dist/* all_dist/ + ls -ltr all_dist/ + + - name: Upload all dist/* to GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: all_dist/* diff --git a/gaussdb/README.rst b/gaussdb/README.rst index 39ccede09..6bd5fad17 100644 --- a/gaussdb/README.rst +++ b/gaussdb/README.rst @@ -8,7 +8,7 @@ This distribution contains the pure Python package ``gaussdb``. .. Note:: Despite the lack of number in the package name, this package is the - successor of psycopg2_. + successor of psycopg2. Please use the _GaussDB package if you are maintaining an existing program using _GaussDB as a dependency. If you are developing something new, diff --git a/gaussdb/pyproject.toml b/gaussdb/pyproject.toml index 00b58ff9b..12d2c7cca 100644 --- a/gaussdb/pyproject.toml +++ b/gaussdb/pyproject.toml @@ -4,14 +4,13 @@ build-backend = "setuptools.build_meta" [project] name = "gaussdb" -description = "PostgreSQL database adapter for Python" +description = "GaussDB database adapter for Python" # STOP AND READ! if you change: -version = "1.0.0.dev1" +version = "1.0.0.dev2" # also change: # - `docs/news.rst` to declare this as the current version or an unreleased one; # - `gaussdb_c/pyproject.toml` to the same version; -# - the `c ` and `binary` "optional-dependencies" below to the same version. # # NOTE: you can use `tools/bump_version.py` to maintain versions. @@ -49,23 +48,17 @@ email = "daniele.varrazzo@gmail.com" text = "GNU Lesser General Public License v3 (LGPLv3)" [project.urls] -Homepage = "https://gaussdb.org/" -Documentation = "https://gaussdb.org/gaussdb/docs/" -Changes = "https://gaussdb.org/gaussdb/docs/news.html" -Code = "https://github.com/gaussdb/gaussdb" -"Issue Tracker" = "https://github.com/gaussdb/gaussdb/issues" +Homepage = "https://psycopg.org/" +Documentation = "https://psycopg.org/psycopg3/docs/" +Changes = "https://psycopg.org/psycopg3/docs/news.html" +Code = "https://github.com/psycopg/psycopg" +"Issue Tracker" = "https://github.com/psycopg/psycopg/issues" [project.readme] file = "README.rst" content-type = "text/x-rst" [project.optional-dependencies] -c = [ - "gaussdb-c == 1.0.0.dev1; implementation_name != \"pypy\"", -] -binary = [ - "gaussdb-binary == 1.0.0.dev1; implementation_name != \"pypy\"", -] pool = [ "gaussdb-pool", ] diff --git a/gaussdb_pool/pyproject.toml b/gaussdb_pool/pyproject.toml index 33ee3b958..37a16a334 100644 --- a/gaussdb_pool/pyproject.toml +++ b/gaussdb_pool/pyproject.toml @@ -44,11 +44,11 @@ email = "daniele.varrazzo@gmail.com" text = "GNU Lesser General Public License v3 (LGPLv3)" [project.urls] -Homepage = "https://gaussdb.org/" -Documentation = "https://www.gaussdb.org/gaussdb/docs/advanced/pool.html" -Changes = "https://gaussdb.org/gaussdb/docs/news_pool.html" -Code = "https://github.com/gaussdb/gaussdb" -"Issue Tracker" = "https://github.com/gaussdb/gaussdb/issues" +Homepage = "https://psycopg.org/" +Documentation = "https://www.psycopg.org/psycopg3/docs/advanced/pool.html" +Changes = "https://psycopg.org/psycopg3/docs/news_pool.html" +Code = "https://github.com/psycopg/psycopg" +"Issue Tracker" = "https://github.com/psycopg/psycopg/issues" [project.readme] file = "README.rst" diff --git a/tools/isort-gaussdb/README.rst b/tools/isort-gaussdb/README.rst index 9b7a4a732..98d0cc496 100644 --- a/tools/isort-gaussdb/README.rst +++ b/tools/isort-gaussdb/README.rst @@ -26,4 +26,4 @@ Note: because this is the first day I use isort at all, there is a chance that this plug-in is totally useless and the same can be done using isort features. .. _isort: https://pycqa.github.io/isort/ -.. _gaussdb 3: https://www.gaussdb.org/ +.. _gaussdb: https://www.huaweicloud.com/product/gaussdb.html