@@ -30,20 +30,18 @@ jobs:
3030 runs-on : ${{ matrix.os }}
3131 needs : [create_version]
3232 strategy :
33- fail-fast : false
33+ fail-fast : true
3434 matrix :
35- include :
36- - os : ubuntu-24.04
37- arch : x86_64
38- - os : macos-13
39- arch : auto
35+ os : [ubuntu-24.04, macos-13]
36+ python-version : ['3.10', '3.11', '3.12']
37+
4038
4139 steps :
4240 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4341 - name : Set up Python
4442 uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
4543 with :
46- python-version : ' 3.10 '
44+ python-version : ${{ matrix.python-version }}
4745
4846 - uses : actions/download-artifact@master
4947 with :
@@ -57,13 +55,22 @@ jobs:
5755 disk-cache : ${{ github.workflow }}
5856 repository-cache : true
5957
58+ - name : Set Python Version
59+ env :
60+ TARGET_PYTHON : ${{ matrix.python-version }}
61+ run : |
62+ echo "set version to ${TARGET_PYTHON}"
63+ python _update_bazel_py_version.py $TARGET_PYTHON
64+
6065 - name : Build package
66+ env :
67+ TARGET_PYTHON : ${{ matrix.python-version }}
6168 run : |
62- bazel build --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel
69+ bazel build --define TARGET_VERSION="$(python -c "print(\"py${TARGET_PYTHON}\".replace(\".\", \"\"))")" --define VERSION="$(cat version/version.txt)" :tesseract_decoder_wheel
6370
6471 - uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
6572 with :
66- name : python-wheels-${{ matrix.os }}
73+ name : python-wheels-${{ matrix.os }}-${{ matrix.python-version }}
6774 path : ./bazel-bin/*.whl
6875
6976 release-wheels :
8895 packages_dir : wheelhouse/
8996 verbose : true
9097
98+
9199 - name : Publish package to pypi
92100 uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
93101 with :
0 commit comments