# publish.ps1
# Script to build and upload to PyPI

Write-Host "--- Checking build tools... ---" -ForegroundColor Cyan
pip install --upgrade build twine

# Run python script with passed arguments
python scripts/publish.py $args

if ($LASTEXITCODE -ne 0) {
    Write-Host "[ERROR] An error occurred during publishing." -ForegroundColor Red
    exit $LASTEXITCODE
}
