TestPyPI Release #2
Workflow file for this run
This file contains 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: TestPyPI Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build_wheels: | |
name: Build wheel for ${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
runs-on: ${{ matrix.os-platform[0] }} | |
env: | |
CIBW_BUILD_FRONTEND: "build[uv]" | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [39, 310, 311, 312, 313] | |
os-platform: | |
[ | |
[ubuntu-latest, manylinux_x86_64], | |
[ubuntu-latest, manylinux_aarch64], | |
[windows-latest, win_amd64], | |
[macos-12, macosx_x86_64], | |
[macos-14, macosx_arm64], | |
] | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
submodules: "true" | |
- name: Set up QEMU | |
if: matrix.os-platform[1] == 'manylinux_aarch64' | |
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | |
with: | |
platforms: arm64 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@c9aa747934b6867b18bf8f6624a8929c4f76147b # v3.1.4 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2 | |
env: | |
CIBW_BUILD: cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
CIBW_TEST_SKIP: "*" | |
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: artifact-cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} | |
path: ./wheelhouse/*.whl | |
retention-days: 1 | |
build_sdist: | |
name: Build sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
submodules: true | |
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: "3.10" | |
- name: Build sdist | |
run: | | |
python -m pip install build scikit-build-core | |
python -m build --sdist --outdir dist | |
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
path: ./dist/*.tar.gz | |
retention-days: 1 | |
upload_to_pypi: | |
name: "Upload to TestPyPI" | |
if: github.repository == 'Nixtla/coreforecast' | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Publish package to TestPyPI | |
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3 | |
with: | |
repository-url: https://test.pypi.org/legacy/ |