Skip to content

Update keras version to 3.15 (#2852) #335

Update keras version to 3.15 (#2852)

Update keras version to 3.15 (#2852) #335

name: Publish to PyPI
on: push
permissions:
contents: read
jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.11'
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip setuptools
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
# zizmor: ignore[cache-poisoning]
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-common.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
pip install -r requirements.txt --progress-bar off
- name: Build a binary wheel and a source tarball
run: >-
python pip_build.py
- name: Publish KerasHub to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 # zizmor: ignore[use-trusted-publishing]
with:
password: ${{ secrets.PYPI_API_TOKEN_HUB }}
verbose: true
- name: Publish KerasNLP to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 # zizmor: ignore[use-trusted-publishing]
with:
packages-dir: keras_nlp/dist/
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true