]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
last try
authorBob Halley <halley@dnspython.org>
Wed, 3 Sep 2025 19:41:04 +0000 (12:41 -0700)
committerBob Halley <halley@dnspython.org>
Wed, 3 Sep 2025 19:41:04 +0000 (12:41 -0700)
.github/workflows/publish.yml
pyproject.toml

index 1f766b71619cd418a9fe376e00e6cd5481e9f57c..ac5c9038bee63cab2199509dffb3fcf62800838c 100644 (file)
@@ -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:
index afaef5974b17c05a6ae6b4158e2a02a98731366a..fef9f2cc65eb724a40c1eec17fdafef8e5f54524 100644 (file)
@@ -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" }