Skip to content

Prepare for release #107

Prepare for release

Prepare for release #107

Workflow file for this run

name: Build Wheels
on:
push:
branches:
- main
tags:
- 'v[0-9].*'
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macOS-11]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
Invoke-WebRequest https://nmap.org/npcap/dist/npcap-sdk-1.13.zip -OutFile npcap-sdk.zip
Expand-Archive npcap-sdk.zip
echo "NPCAP_SDK=$(Resolve-Path npcap-sdk)" >> $env:GITHUB_ENV
- name: Build sdist
if: matrix.os == 'ubuntu-20.04'
run: |
pip install cython>=3.0.0
python setup.py sdist
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: 'pp* *-musllinux*'
CIBW_ARCHS_MACOS: universal2
CIBW_BEFORE_ALL_LINUX: >
yum install -y flex bison libnl3-devel bluez-libs-devel &&
curl https://www.tcpdump.org/release/libpcap-1.10.1.tar.gz -O &&
tar xf libpcap-1.10.1.tar.gz &&
cd libpcap-1.10.1 &&
./configure &&
make -j2 &&
make install
CIBW_ENVIRONMENT_WINDOWS: NPCAP_SDK=$NPCAP_SDK
with:
output-dir: dist
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: dist/*
upload_release:
name: Upload release
needs: [build_wheels]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
path: dist
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: dist/*