From 609d9a4f94088d66275887c4851052fcb207d453 Mon Sep 17 00:00:00 2001 From: pdmurray Date: Wed, 21 Aug 2024 21:44:06 -0700 Subject: [PATCH 1/2] Add a build workflow for the project --- .github/workflows/wheels.yml | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 00000000..11bfe623 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,64 @@ +name: Build Wheels & Publish to PyPI + +on: + pull_request: + workflow_dispatch: + release: + types: [published] + +jobs: + build-package: + name: Build sdist + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install python dependencies + run: pip install build twine + + - name: Build sdist and wheel + run: | + python -m build -o wheelhouse + + - name: List and check sdist + run: | + ls -lh wheelhouse/ + twine check wheelhouse/* + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: sdist + path: ./wheelhouse/*.tar.gz + + upload_to_pypi: + name: Upload to PyPI + runs-on: ubuntu-latest + if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch') + needs: [build-package] + environment: + name: pypi + url: https://pypi.org/p/tensorflow-transform + permissions: + id-token: write + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + merge-multiple: true + path: wheels/ + + - name: List the build artifacts + run: | + ls -lAs wheels/ + + - name: Upload to PyPI + uses: pypa/gh-action-pypi-publish@release/v1.9 + with: + packages_dir: wheels/ From 5ef30ddc0f761c32eab7e9b58f319206765408b2 Mon Sep 17 00:00:00 2001 From: smokestacklightnin <125844868+smokestacklightnin@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:01:42 -0700 Subject: [PATCH 2/2] Upload all build artifacts --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 11bfe623..7be7449a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -35,7 +35,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdist - path: ./wheelhouse/*.tar.gz + path: ./wheelhouse/* upload_to_pypi: name: Upload to PyPI