From 2b9fb3f916b7baefe57024fcb3cd99c508dff5ed Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Wed, 3 Sep 2025 12:41:04 -0700 Subject: [PATCH] last try --- .github/workflows/publish.yml | 40 +++++++++++++++++++++++++---------- pyproject.toml | 2 +- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1f766b71..ac5c9038 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,10 +32,38 @@ jobs: name: python-package-distributions path: dist/ + build-test: + name: Build distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Update project + run: sed -i '' 's/"dnspython"/"dnspython_test"/g' pyproject.toml + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + publish-to-testpypi: name: Publish Python distribution to TestPyPI needs: - - build + - build-test runs-on: ubuntu-latest environment: @@ -51,16 +79,6 @@ jobs: with: name: python-package-distributions path: dist/ - - name: rename - run: | - python3 << 'EOF' - import os - os.chdir("dist") - for f in os.listdir("."): - if f.startswith('dnspython-'): - nf = f.replace("dnspython-", "dnspython_test-") - os.rename(f, nf) - EOF - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/pyproject.toml b/pyproject.toml index afaef597..fef9f2cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["hatchling>=1.21.0"] build-backend = "hatchling.build" [project] -name = "dnspython" +name = "dnspython_test" description = "DNS toolkit" authors = [{ name = "Bob Halley", email = "halley@dnspython.org" }] license = { text = "ISC" } -- 2.47.3