Release #14
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: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
pypi-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/keras-aug | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Lint | |
uses: pre-commit/[email protected] | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('requirements_ci.txt') }} | |
- name: Install dependencies | |
run: | | |
pip install -r requirements_ci.txt --progress-bar off --upgrade | |
pip install -e ".[tests]" --progress-bar off --upgrade | |
- name: Check for API changes | |
run: | | |
bash shell/api_gen.sh | |
git status | |
clean=$(git status | grep "nothing to commit") | |
if [ -z "$clean" ]; then | |
echo "Please run shell/api_gen.sh to generate API." | |
exit 1 | |
fi | |
- name: Build wheels | |
shell: bash | |
run: | | |
pip install --upgrade pip setuptools wheel twine build | |
python -m build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verbose: true |