-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: build frontend in pypi-release workflow #5298
Conversation
This was missing, resulting in the 3.5.0rc1 having no frontend.
- Node 20 has a problem with `pnpm`; set it to Node 18 - Set the working directory for the frontend commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While reviewing this PR I did a comparison with the installer zip and realized that the contents of .mypy_cache
and __pycache__
directories were finding their way into the latter. So I piggybacked a small fix for this on top of the PR -- hope that's ok.
This prevents an empty `dist/` from breaking the app on startup.
… to pypi - The release workflow never runs automatically. It must be manually kicked off. - The release workflow has an input. When running it from the GH actions UI, you will see a "Publish build on PyPi" prompt. If this value is "true", the workflow will upload the build to PyPi, releasing it. If this is anything else (e.g. "false", the default), the workflow will build but not upload to PyPi. - The `dist/` folder (where the python package is built) is uploaded as a workflow artifact as a zip file. This can be downloaded and inspected. This allows "dry" runs of the workflow. - The workflow job and some steps have been renamed to clarify what they do
I've made two further improvements: This prevents an empty feat: add python dist as release artifact, as input to enable publish to pypi
I tested this on my fork to test that the workflow conditional based on the input being "true" works as expected. |
Running the workflow locally with
Using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try it in production.
What type of PR is this? (check all applicable)
Have you discussed this change with the InvokeAI team?
Description
This was missing, resulting in the 3.5.0rc1 having no frontend.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
I've run this locally and it works (I commented out the final steps of the workflow that do PyPi stuff to ensure I didn't accidentally deploy something).
You can run the workflow locally with https://github.com/nektos/act. Suggest using the
gh
CLI version, its very easy to set up if you have the github CLI installed. Then you can rungh act -W .github/workflows/pypi-release.yml
to run the workflow locally in a docker image.I don't know this local action runner would actually release to PyPi - as mentioned, I commented those steps out when testing - but it does successfully do both frontend and backend builds.
Merge Plan
This needs @lstein 's approval.
[optional] Are there any post deployment tasks we need to perform?
Cut an RC2