docs/RELEASE.md
The Invoke application is published as a python package on PyPI. This includes both a source distribution and built distribution (a wheel).
Most users install it with the Launcher, others with pip.
The launcher uses GitHub as the source of truth for available releases.
Make a developer call-out for PRs to merge. Merge and test things
out. Create a branch with a name like user/chore/vX.X.X-prep and bump the version by editing
invokeai/version/invokeai_version.py and commit locally.
The release.yml workflow runs a number of jobs to handle code checks, tests, build and publish on PyPI.
It is triggered on tag push, when the tag matches v*.
Ensure all commits that should be in the release are merged into this branch, and that you have pulled them locally.
Run make tag-release to tag the current commit and kick off the workflow. You will be prompted to provide a message - use the version specifier.
If this version's tag already exists for some reason (maybe you had to make a last minute change), the script will overwrite it.
Push the commit to trigger the workflow.
In case you cannot use the Make target, the release may also be dispatched manually via GH.
The workflow consists of a number of concurrently-run checks and tests, then two final publish jobs.
The publish jobs require manual approval and are only run if the other jobs succeed.
check-version JobThis job ensures that the invokeai python package version specifier matches the tag for the release. The version specifier is pulled from the __version__ variable in invokeai/version/invokeai_version.py.
This job uses samuelcolvin/check-python-version.
Any valid version specifier works, so long as the tag matches the version. The release workflow works exactly the same for
RC,post,dev, etc.
Next, these jobs run and must pass. They are the same jobs that are run for every PR.
python-tests: runs pytest on matrix of platformspython-checks: runs ruff (format and lint)frontend-tests: runs vitestfrontend-checks: runs prettier (format), eslint (lint), dpdm (circular refs), tsc (static type check) and knip (unused imports)typegen-checks: ensures the frontend and backend types are syncedbuild-wheel JobThis sets up both python and frontend dependencies and builds the python package. Internally, this runs ./scripts/build_wheel.sh and uploads dist.zip, which contains the wheel and unarchived build.
You don't need to download or test these artifacts.
At this point, the release workflow pauses as the remaining publish jobs require approval.
It's possible to test the python package before it gets published to PyPI. We've never had problems with it, so it's not necessary to do this.
But, if you want to be extra-super careful, here's how to test it:
dist.zip build artifact from the build-wheel jobIf testing reveals any issues, no worries. Cancel the workflow, which will cancel the pending publish jobs (you didn't approve them prematurely, right?) and start over.
The publish jobs will not run if any of the previous jobs fail.
They use GitHub environments, which are configured as trusted publishers on PyPI.
Both jobs require a @lstein or @blessedcoolant to approve them from the workflow's Summary tab.
testpypi or pypi - typically you select both)If the version already exists on PyPI, the publish jobs will fail. PyPI only allows a given version to be published once - you cannot change it. If version published on PyPI has a problem, you'll need to "fail forward" by bumping the app version and publishing a followup release.
Check the python infrastructure status page for incidents.
If there are no incidents, contact @lstein or @blessedcoolant, who have owner access to GH and PyPI, to see if access has expired or something like that.
publish-testpypi JobPublishes the distribution on the Test PyPI index, using the testpypi GitHub environment.
This job is not required for the production PyPI publish, but included just in case you want to test the PyPI release for some reason:
https://test.pypi.org/simple/publish-pypi JobPublishes the distribution on the production PyPI index, using the pypi GitHub environment.
It's a good idea to wait to approve and run this job until you have the release notes ready!
publish-pypi job to finish if you haven't already.Invoke v5.7.0 (stable): https://github.com/invoke-ai/InvokeAI/releases/tag/v5.7.0
It's a pretty big one - Form Builder, Metadata Nodes (thanks @SkunkWorxDark!), and much more.
Invoke v5.7.0 (stable): https://discord.com/channels/1020123559063990373/1149260708098359327/1344521744916021248
The release workflow can be dispatched manually. You must dispatch the workflow from the right tag, else it will fail the version check.
This functionality is available as a fallback in case something goes wonky. Typically, releases should be triggered via tag push as described above.