From 4363268729132dc02fb9213b3ee6d09d8b6f70bb Mon Sep 17 00:00:00 2001 From: Tim Paine Date: Sat, 12 Nov 2022 13:47:43 -0500 Subject: [PATCH] include sdist in artifact upload --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 41 +++++++++++++++++++++++++++++++++++- Makefile | 2 +- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27c17068..ce1b10c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: - name: Check Wheels run: twine check dist/* - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: ./dist/*.whl name: wheel-test-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fd551e18..941d7989 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -72,7 +72,9 @@ jobs: cibuildwheel: "cp311" steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -122,3 +124,40 @@ jobs: # TWINE_USERNAME: ${{ secrets.PYPI_UN }} # TWINE_PASSWORD: ${{ secrets.PYPI_PW }} # run: make upload + build_sdist: + strategy: + matrix: + os: + - ubuntu-22.04 + python-version: + - 3.9 + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + make develop + python -m pip install -U wheel twine setuptools + + - name: Python SDist Steps + run: python setup.py sdist + + - name: Check sdist + run: twine check dist/*.tar.gz + + - name: Upload SDist + uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz diff --git a/Makefile b/Makefile index 790ef29b..25f507c8 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ fix: python -m ruff format bt setup.py docs/source/conf.py dist: - python setup.py sdist bdist_wheel + python setup.py sdist python -m twine check dist/* upload: dist