From 183529071a58420696d71d6fddd0483194f11e5c Mon Sep 17 00:00:00 2001 From: Ian Lumsden Date: Fri, 7 Jun 2024 16:00:45 -0700 Subject: [PATCH 1/2] Fixes minor typo that will cause CD to fail --- .../workflows/build_and_upload_wheels.yaml | 41 ++----------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build_and_upload_wheels.yaml b/.github/workflows/build_and_upload_wheels.yaml index 92082675..eca1ccbe 100644 --- a/.github/workflows/build_and_upload_wheels.yaml +++ b/.github/workflows/build_and_upload_wheels.yaml @@ -2,8 +2,8 @@ name: Build wheels on: # Uncomment for testing through a PR - # pull_request: - # branches: [develop, releases/**] + pull_request: + branches: [develop, releases/**] workflow_dispatch: release: types: @@ -35,39 +35,6 @@ jobs: name: hatchet_build_artifacts_wheels_linux_3 path: ./wheelhouse/*.whl - # TODO: uncomment if/when we decide to build wheels for macOS - # build_wheels_macos_36_37: - # name: Build wheels for Python 3.6 and 3.7 on macOS - # runs-on: macos-12 - # steps: - # - uses: actions/checkout@v3 - - # - uses: pypa/cibuildwheel@v2.12.1 - # env: - # CIBW_SKIP: pp* - # CIBW_ARCHS_MACOS: x86_64 - # CIBW_PROJECT_REQUIRES_PYTHON: ">=3.6,<3.8" - - # - uses: actions/upload-artifact@v3 - # with: - # path: ./wheelhouse/*.whl - - # build_wheels_macos_38_plus: - # name: Build wheels for Python 3.8+ on macOS - # runs-on: macos-12 - # steps: - # - uses: actions/checkout@v3 - - # - uses: pypa/cibuildwheel@v2.12.1 - # env: - # CIBW_SKIP: pp* - # CIBW_ARCHS_MACOS: x86_64 universal2 arm64 - # CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" - - # - uses: actions/upload-artifact@v3 - # with: - # path: ./wheelhouse/*.whl - build_sdist: name: Build sdist runs-on: ubuntu-20.04 @@ -80,7 +47,7 @@ jobs: - name: Build sdist run: python -m build -s - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: hatchet_build_artifacts_sdist path: dist/*.tar.gz @@ -113,7 +80,7 @@ jobs: # - build_wheels_macos_38_plus - build_sdist runs-on: ubuntu-20.04 - if: (github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch' + # if: (github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch' steps: - uses: actions/download-artifact@v4 with: From 9b0e69297d3b20446fa4146e72d2f9e937ed74c4 Mon Sep 17 00:00:00 2001 From: Ian Lumsden Date: Fri, 7 Jun 2024 16:51:30 -0700 Subject: [PATCH 2/2] Removes PR trigger and re-enables PyPI upload now that test is passing --- .../workflows/build_and_upload_wheels.yaml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_upload_wheels.yaml b/.github/workflows/build_and_upload_wheels.yaml index eca1ccbe..8e556fe1 100644 --- a/.github/workflows/build_and_upload_wheels.yaml +++ b/.github/workflows/build_and_upload_wheels.yaml @@ -2,8 +2,8 @@ name: Build wheels on: # Uncomment for testing through a PR - pull_request: - branches: [develop, releases/**] + # pull_request: + # branches: [develop, releases/**] workflow_dispatch: release: types: @@ -66,6 +66,10 @@ jobs: pattern: hatchet_build_artifacts_* merge-multiple: true path: dist + + - name: Check build artifacts + run: | + ls -lah dist - uses: pypa/gh-action-pypi-publish@release/v1 with: @@ -80,7 +84,7 @@ jobs: # - build_wheels_macos_38_plus - build_sdist runs-on: ubuntu-20.04 - # if: (github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch' + if: (github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch' steps: - uses: actions/download-artifact@v4 with: @@ -92,9 +96,9 @@ jobs: run: | ls -lah dist - # - uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # user: __token__ - # password: ${{ secrets.PYPI_API_TOKEN }} - # # Uncomment the line below if you want to upload to PyPI - # # repository_url: https://test.pypi.org/legacy/ + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + # Uncomment the line below if you want to upload to PyPI + # repository_url: https://test.pypi.org/legacy/