Skip to content

Build & Deploy Windows Wheel #5

Build & Deploy Windows Wheel

Build & Deploy Windows Wheel #5

Workflow file for this run

name: Build & Deploy Windows Wheel
on:
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
repository: dderiso/gdtw
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine numpy
- name: Install Visual C++ Build Tools
uses: microsoft/vs-setup-exe@v1
with:
vs-version: '[17.0,18.0)'
components: Microsoft.VisualStudio.Component.VC.Tools.x86.x64
- name: Set up environment for MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build wheel
run: |
python setup.py bdist_wheel
env:
PYTHONPATH: ${{ env.pythonLocation }}
DISTUTILS_USE_SDK: "1"
MSSdk: "1"
- name: Debug output
run: |
dir /s build
if exist build\temp.win-amd64-cpython-311\Release\gdtw\gdtwcpp.cp311-win_amd64.lib (
type build\temp.win-amd64-cpython-311\Release\gdtw\gdtwcpp.cp311-win_amd64.lib
) else (
echo File not found: build\temp.win-amd64-cpython-311\Release\gdtw\gdtwcpp.cp311-win_amd64.lib
dir /s build\temp.win-amd64-cpython-311\Release\gdtw
)
- name: Publish Wheel
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install twine
dir dist
for /f "delims=" %%i in ('dir /b /o-d dist\*.whl') do set latest_wheel=dist\%%i
echo %latest_wheel%
python -m twine upload %latest_wheel%