From a579227a962e355d479b7c7fc644a8dd87448113 Mon Sep 17 00:00:00 2001 From: David Minton Date: Fri, 1 Mar 2024 18:30:03 -0500 Subject: [PATCH] Updated the workflow file for the v4 of upload-artifact --- .github/workflows/build_wheels.yml | 53 +++++++++++++++++------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index b8d75f552..488180420 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,6 +1,8 @@ name: swiftest -on: +on: + workflow_dispatch: + pull_request: push: branches: - master @@ -11,32 +13,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-11, macos-12, macos-13] - cibw_archs: [x86_64] - include: - - os: ubuntu-latest - cibw_archs: "aarch64" - env: - SYSTEM_VERSION_COMPAT: 0 + os: [ubuntu-latest, macos-11, macos-13, macos-13, macos-14] steps: - - name: Set up QEMU - if: matrix.cibw_archs == 'aarch64' - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Build wheels - uses: pypa/cibuildwheel@v2.15.0 - env: - CIBW_ARCHS: ${{ matrix.cibw_archs }} - with: - package-dir: . - output-dir: wheelhouse - config-file: "{package}/pyproject.toml" + uses: pypa/cibuildwheel@v2.16.5 - uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl build_sdist: @@ -50,4 +37,26 @@ jobs: - uses: actions/upload-artifact@v4 with: - path: dist/*.tar.gz \ No newline at end of file + name: cibw-sdist + path: dist/*.tar.gz + + upload_pypi: + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/swiftest + permissions: + id-token: write + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/download-artifact@v4 + with: + # unpacks all CIBW artifacts into dist/ + pattern: cibw-* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true \ No newline at end of file