From 7a099326db7644c1b64005563a487645632efefb Mon Sep 17 00:00:00 2001 From: Will Toohey Date: Sat, 25 Apr 2026 23:10:40 +1000 Subject: [PATCH] Also build the windows .exe --- .github/workflows/maturin.yml | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maturin.yml b/.github/workflows/maturin.yml index df9d4b6..d113152 100644 --- a/.github/workflows/maturin.yml +++ b/.github/workflows/maturin.yml @@ -191,11 +191,32 @@ jobs: name: wheels-sdist path: dist + windows-exe: + name: Standalone .exe (Windows x86_64) + runs-on: windows-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: '3.11' + architecture: x64 + - uses: dtolnay/rust-toolchain@stable + - uses: astral-sh/setup-uv@v7 + - name: Install ifstools (builds the native extension via maturin) + run: uv venv --clear + run: uv pip install . pyinstaller==6.19.0 + - name: Build standalone exe + run: uv run pyinstaller --onefile --name ifstools ifstools_bin.py + - uses: actions/upload-artifact@v6 + with: + name: ifstools-windows-x86_64-exe + path: dist/ifstools.exe + release: name: Release runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} - needs: [linux, musllinux, windows, macos, sdist] + needs: [linux, musllinux, windows, macos, sdist, windows-exe] permissions: # Use to sign the release artifacts id-token: write @@ -208,7 +229,9 @@ jobs: - name: Generate artifact attestation uses: actions/attest-build-provenance@v3 with: - subject-path: 'wheels-*/*' + subject-path: | + wheels-*/* + ifstools-windows-x86_64-exe/* - name: Install uv if: ${{ startsWith(github.ref, 'refs/tags/') }} uses: astral-sh/setup-uv@v7 @@ -217,3 +240,8 @@ jobs: run: uv publish 'wheels-*/*' env: UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + - name: Upload exe to GitHub Release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + uses: softprops/action-gh-release@v2 + with: + files: ifstools-windows-x86_64-exe/ifstools.exe