From 170169dbcae552aabc0aa3bc58aa014cbbf05d76 Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 6 Mar 2023 12:19:32 +0100 Subject: [PATCH] Restore package action in CI/CD. --- .github/workflows/ci_cd.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 9ec647a7..82a9f403 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -9,6 +9,42 @@ on: jobs: + package: + name: Package the project + runs-on: ubuntu-22.04 + + steps: + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Python tools + run: pip install build twine + + - name: Create distributions + run: python -m build -o dist/ + + - name: Inspect dist folder + run: ls -lah dist/ + + - name: Check wheel's abi and platform tags + run: test $(find dist/ -name *-none-any.whl | wc -l) -gt 0 + + - name: Run twine check + run: twine check dist/* + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + path: dist/* + name: dist + test: name: 'Python${{ matrix.python }}@${{ matrix.os }}' needs: package