Try fix .yaml execution... #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and publish platform wheels | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build-and-publish: | |
| name: Build wheel for ${{ matrix.folder }} | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - folder: win-x86 | |
| plat_tag: win32 | |
| - folder: win-x64 | |
| plat_tag: win_amd64 | |
| - folder: win-arm64 | |
| plat_tag: win_arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Prepare scripts directory | |
| shell: cmd | |
| run: | | |
| echo Verificando archivo .bat en src\initvenv\scripts... | |
| if not exist "src\initvenv\scripts\initvenv.bat" ( | |
| echo Error: No se encontró src\initvenv\scripts\initvenv.bat | |
| exit 1 | |
| ) else ( | |
| echo ✓ src\initvenv\scripts\initvenv.bat encontrado | |
| ) | |
| rem Limpia cualquier initvenv.exe anterior en el paquete | |
| if exist "src\initvenv\scripts\initvenv.exe" ( | |
| del /Q "src\initvenv\scripts\initvenv.exe" | |
| echo Eliminado initvenv.exe previo en src\initvenv\scripts | |
| ) | |
| echo Copiando .exe desde src\initvenv\bin\${{ matrix.folder }} | |
| if exist "src\initvenv\bin\${{ matrix.folder }}\initvenv.exe" ( | |
| copy /Y "src\initvenv\bin\${{ matrix.folder }}\initvenv.exe" "src\initvenv\scripts\initvenv.exe" | |
| echo ✓ Copiado initvenv.exe a src\initvenv\scripts\initvenv.exe | |
| ) else ( | |
| echo Error: no se encontró src\initvenv\bin\${{ matrix.folder }}\initvenv.exe | |
| exit 1 | |
| ) | |
| - name: Install build tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build twine wheel setuptools | |
| - name: Build wheel | |
| run: python -m build --wheel | |
| - name: Rename wheel to platform tag | |
| shell: pwsh | |
| run: | | |
| $wheel = Get-ChildItem dist\*.whl | Select-Object -First 1 | |
| $newName = $wheel.Name -replace "py3-none-any", "py3-none-${{ matrix.plat_tag }}" | |
| Rename-Item $wheel.FullName "dist\$newName" | |
| - name: Publish wheel to PyPI | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
| run: python -m twine upload dist/*.whl | |
| - name: Upload artifact (wheel) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-${{ matrix.plat_tag }} | |
| path: dist/*.whl | |
| permissions: | |
| contents: read | |
| packages: write |