From 4338180f12a9d2b13224a7a74810e84d9b3e1438 Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 15 May 2023 15:30:09 +0200 Subject: [PATCH] Test sdist before release --- .github/workflows/release.yaml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bbf0031b1f4bd..fcd100c4ce328 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,30 @@ env: RUSTUP_MAX_RETRIES: 10 jobs: + sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: "Prep README.md" + run: python scripts/transform_readme.py --target pypi + - name: "Build sdist" + uses: PyO3/maturin-action@v1 + with: + args: sdist + - name: "Test sdist" + run: | + pip install dist/${{ env.PACKAGE_NAME }}-*.tar.gz --force-reinstall + ruff --help + python -m ruff --help + - name: "Upload sdist" + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + macos-x86_64: runs-on: macos-latest steps: @@ -32,7 +56,7 @@ jobs: uses: PyO3/maturin-action@v1 with: target: x86_64 - args: --release --out dist --sdist + args: --release --out dist - name: "Test wheel - x86_64" run: | pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall