v0.1.11 Release #66
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and upload to PyPI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} for Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
#os: [ubuntu-latest, windows-latest, macOS-12] | |
os: [ubuntu-latest] | |
# python-version: ["3.9", "3.10", "3.11", "3.12"] # Also see MODULE.bazel | |
# Note: Python 3.12 builds are blocked on TensorFlow PR 74090. See | |
# requirements.in for details. | |
python-version: ["3.9", "3.10", "3.11"] # Also see MODULE.bazel | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wheel | |
shell: bash | |
run: | | |
sed -i 's/DEFAULT_PYTHON = "3.10"/DEFAULT_PYTHON = "${{ matrix.python-version }}"/' ./MODULE.bazel | |
sed -i 's/DEFAULT_PYTHON = "3.10"/DEFAULT_PYTHON = "${{ matrix.python-version }}"/' ./BUILD | |
bazelisk build //:wheel | |
bazelisk run //:wheel_rename | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-${{ matrix.os }}-${{ matrix.python-version }} | |
path: bazel-bin/*.whl | |
upload_pypi: | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/project/tf-shell/ | |
permissions: | |
id-token: write | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- name: Download wheels | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: 'artifact-*' | |
path: dist | |
merge-multiple: true | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |