diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 1bb83a4..d2f267a 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -26,7 +26,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 submodules: true @@ -53,27 +53,27 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-24.04, macOS-11 ] - python-version: [ 36, 37, 38, 39, 310, 311 ] + os: [ ubuntu-24.04, macOS-13 ] + python-version: [ 38, 39, 310, 311 ] steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 submodules: true - name: "Build wheel (${{ matrix.os }}, py${{ matrix.python-version }})" - uses: pypa/cibuildwheel@v2.11.1 + uses: pypa/cibuildwheel@v2.21.3 with: config-file: cibuildwheel.toml env: CIBW_BUILD: "cp${{ matrix.python-version}}-*" - name: "Upload build artifacts (${{ matrix.os }}, py${{ matrix.python-version }})" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: dist + name: dist-${{ matrix.os }}-py${{ matrix.python-version }} path: ./wheelhouse/*.whl make_sdist: @@ -83,7 +83,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 submodules: true @@ -94,9 +94,9 @@ jobs: pipx run build --sdist - name: "Upload build artifacts" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: "dist" + name: "dist-sdist" path: "dist/*.tar.gz" publish_to_pypi: @@ -113,10 +113,14 @@ jobs: steps: - name: "Download build artifacts" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: "dist" - path: "dist" + path: "artifacts" + + - name: "Collect all artifacts into dist folder" + run: | + mkdir -p dist + find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec cp {} dist/ \; - name: "Publish to PyPI" if: startsWith(github.ref, 'refs/tags')