Commit Diff


commit - ff64fa9e4418059400fe503f56ff6ccb8a38f498
commit + 1e94afdccfeb80a95707dd73e628d7d503d20977
blob - /dev/null
blob + bdf38fa159e959ad917da801239c5a138c4396df (mode 644)
--- /dev/null
+++ .github/workflows/python-distributions.yml
@@ -0,0 +1,80 @@
+name: Build Python distributions
+
+on:
+  push:
+  schedule:
+    - cron: "0 6 * * *" # Daily 6AM UTC build
+
+jobs:
+  build-wheels:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-latest, macos-latest, windows-latest]
+      fail-fast: true
+
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v3
+      - name: Install native dependencies (Ubuntu)
+        run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
+        if: "matrix.os == 'ubuntu-latest'"
+      - name: Install native dependencies (MacOS)
+        run: brew install swig gpgme
+        if: "matrix.os == 'macos-latest'"
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install setuptools wheel fastimport paramiko urllib3 cibuildwheel==2.9.0
+      - name: Install gpg on supported platforms
+        run: pip install -U gpg
+        if: "matrix.os != 'windows-latest'"
+      - name: Run test suite
+        run: python -m unittest dulwich.tests.test_suite
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+        if: "matrix.os == 'ubuntu-latest'"
+      - name: Build wheels
+        run: python -m cibuildwheel --output-dir wheelhouse
+        env:
+          CIBW_ARCHS_LINUX: x86_64 aarch64
+          CIBW_ARCHS_MACOS: x86_64 arm64 universal2
+          CIBW_ARCHS_WINDOWS: AMD64 x86
+      - name: Upload wheels
+        uses: actions/upload-artifact@v3
+        with:
+          path: ./wheelhouse/*.whl
+
+  build-sdist:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v3
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install build
+      - name: Build sdist
+        run: python -m build --sdist
+      - name: Upload sdist
+        uses: actions/upload-artifact@v3
+        with:
+          path: ./dist/*.tar.gz
+
+  publish:
+    runs-on: ubuntu-latest
+    needs:
+      - build-wheels
+      - build-sdist
+    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/dulwich-')
+    steps:
+      - name: Download distributions
+        uses: actions/download-artifact@v2
+        with:
+          name: artifact
+          path: dist
+      - name: Publish distributions
+        env:
+          TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
+          TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+        run: twine upload dist/*
blob - d8160aff8c0257f7900d4cd7031d85758acd46cb (mode 644)
blob + /dev/null
--- .github/workflows/pythonwheels.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-name: Build Python Wheels
-
-on:
-  push:
-  schedule:
-    - cron: "0 6 * * *" # Daily 6AM UTC build
-
-jobs:
-  build:
-    runs-on: ${{ matrix.os }}
-    strategy:
-      matrix:
-        os: [ubuntu-latest, macos-latest, windows-latest]
-      fail-fast: true
-
-    steps:
-      - uses: actions/checkout@v3
-      - uses: actions/setup-python@v3
-      - name: Install native dependencies (Ubuntu)
-        run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
-        if: "matrix.os == 'ubuntu-latest'"
-      - name: Install native dependencies (MacOS)
-        run: brew install swig gpgme
-        if: "matrix.os == 'macos-latest'"
-      - name: Install dependencies
-        run: |
-          python -m pip install --upgrade pip
-          pip install setuptools wheel fastimport paramiko urllib3 cibuildwheel==2.9.0
-      - name: Install gpg on supported platforms
-        run: pip install -U gpg
-        if: "matrix.os != 'windows-latest'"
-      - name: Run test suite
-        run: python -m unittest dulwich.tests.test_suite
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v1
-        if: "matrix.os == 'ubuntu-latest'"
-      - name: Build wheels
-        run: python -m cibuildwheel --output-dir wheelhouse
-        env:
-          CIBW_ARCHS_LINUX: x86_64 aarch64
-          CIBW_ARCHS_MACOS: x86_64 arm64 universal2
-          CIBW_ARCHS_WINDOWS: AMD64 x86
-      - name: Upload wheels
-        uses: actions/upload-artifact@v3
-        with:
-          path: ./wheelhouse/*.whl
-
-  publish:
-    runs-on: ubuntu-latest
-
-    needs: build
-    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/dulwich-')
-    steps:
-      - uses: actions/setup-python@v3
-
-      - name: Install twine
-        run: |
-          python -m pip install --upgrade pip
-          pip install twine
-      - name: Download wheels
-        uses: actions/download-artifact@v2
-      - name: Publish wheels
-        env:
-          TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
-          TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
-        run: twine upload artifact/*.whl