ci: Build wheels and sdist in CI
@@ -4,6 +4,7 @@ name: Python package
on: [push]
jobs:
+
build:
runs-on: ubuntu-latest
@@ -25,3 +26,45 @@ jobs:
- name: Test with tox
run: tox
+
+ - name: Build with bdist wheel
+ run: |
+ pip install cython numpy setuptools wheel
+ python setup.py bdist_wheel
+
+ - name: Archive production artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: dist
+ path: |
+ dist
+
+ build-sdist:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install cython numpy setuptools wheel
+ python setup.py sdist
+
+ - name: Archive production artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: dist
+ path: |
+ dist
+
+ release:
+ needs: ["build-sdist", "build"]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Download all workflow run artifacts
+ uses: actions/download-artifact@v2
+ - run: ls dist
