|
@@ -1,4 +1,4 @@
|
|
|
-name: Build Python Wheels
|
|
|
+name: Build Python distributions
|
|
|
|
|
|
on:
|
|
|
push:
|
|
@@ -6,7 +6,7 @@ on:
|
|
|
- cron: "0 6 * * *" # Daily 6AM UTC build
|
|
|
|
|
|
jobs:
|
|
|
- build:
|
|
|
+ build-wheels:
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
strategy:
|
|
|
matrix:
|
|
@@ -45,22 +45,36 @@ jobs:
|
|
|
with:
|
|
|
path: ./wheelhouse/*.whl
|
|
|
|
|
|
- publish:
|
|
|
+ build-sdist:
|
|
|
runs-on: ubuntu-latest
|
|
|
-
|
|
|
- needs: build
|
|
|
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/dulwich-')
|
|
|
steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
- uses: actions/setup-python@v3
|
|
|
-
|
|
|
- - name: Install twine
|
|
|
+ - name: Install dependencies
|
|
|
run: |
|
|
|
python -m pip install --upgrade pip
|
|
|
- pip install twine
|
|
|
- - name: Download wheels
|
|
|
+ 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
|
|
|
- - name: Publish wheels
|
|
|
+ with:
|
|
|
+ name: artifact
|
|
|
+ path: dist
|
|
|
+ - name: Publish distributions
|
|
|
env:
|
|
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
|
- run: twine upload artifact/*.whl
|
|
|
+ run: twine upload dist/*
|