Add button-driven release panel and PyPI publish workflow - #14
laxmareddyp wants to merge 1 commit into
Conversation
|
Once automated releases are enabled across all Keras repos, I'll update the central release documentation and link it in the individual repos. As part of this cleanup, we’ll remove local publish-to-pypi.yml files, followed by Phase 2: centralizing all nightly workflows into this repo and removing them from all repos. While the pipeline can run fully autonomously, we’re implementing two manual verification gates to prevent accidental PyPI publishes: A bot opens a PR to create the release branch, builds the distribution artifacts, executes smoke tests, runs commit-based sanity checks, and drafts the release notes. An explicit manual approval gate within the workflow authorizes the final publish to PyPI. |
|
Thanks! This is quite a large PR. I'm not sure if we want to take on the burden of maintaining 7k+ LOC for release management. Can it be simplified? Here's a suggestion: |

Adds a centralized, button-driven release system for Keras repos. Only keras-hub is enabled; keras, keras-rs and kinetic have configs with
enabled: false.How it works
release.yml(Actions → release → Run workflow) is the panel. It works out the next step itself: cut the branch, cherry-pick, open a version-bump PR, then — after a human merges it and runs the panel again — create the tag and GitHub release in onePOST /releases, and startpublish.yml.publish.ymlvalidates the tag, builds, smoke-tests on TensorFlow, JAX and PyTorch, runs Gemini-generated tests, uploads to PyPI through trusted publishing, and checks that PyPI serves the same sha256 digests the build produced.Safety rules, each covered by a test
release-tool/*branches. A static scan of the JS and of every workflowrun:/script:body enforces this.main.override_generated_testswas ticked.Verification (VM, Node 22.11 / Python 3.11)
node --test 'scripts/**/*.test.js': 225/225pytest scripts/release/py: 49/49zizmor 1.30.1 --offlineon the three workflows: no findingsNeeds admin setup before first use (see
RELEASE_PROCESS.md§8): the release GitHub App with secretsRELEASE_APP_CLIENT_ID/RELEASE_APP_PRIVATE_KEYin thereleaseandrelease-readenvironments, repo variableRELEASE_APP_SLUG,GEMINI_APIin thegeminienvironment, the PyPI trusted publisher, and the keras-hub rulesets.Known follow-ups: check every package on PyPI (not only the first); show the full commit count in the "commits after merge" message; drop the hardcoded
vtag prefix; dry-run wording when every pick is already on the branch. The install block inpublish.ymlis repeated on purpose — the smoke and generated-test jobs do not check out code.