-
Notifications
You must be signed in to change notification settings - Fork 61
Add release instructions to repo #474
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Releasing Kaleido | ||
|
|
||
| Follow the steps in this document to release a new version of Kaleido. | ||
|
|
||
| ## Overview | ||
|
|
||
| - Versions are determined automatically from git tags by `setuptools-git-versioning`. There is no hard-coded version string to update. Pushing a `v*` tag triggers CI, which tests and publishes the package to TestPyPI. | ||
| - Publishing to PyPI and creating a GitHub release are done manually. | ||
|
|
||
| ## Release steps | ||
|
|
||
| 1. Create release branch titled `release-vX.Y.Z` | ||
| - We try to follow [semantic versioning guidelines](https://semver.org) as much as possible | ||
| 2. Update the changelog: | ||
| - Review the items in `CHANGELOG.md` under the "Unreleased" header | ||
| - Ensure all items follow this format: | ||
| - `- Description of change [[#XXXX](https://github.com/plotly/Kaleido/pull/XXXX)]` | ||
| - ...followed by `with thanks to @username for the contribution!` if the PR is from a community contributor | ||
| - Add any missing items (PRs which were merged since the last release) | ||
| - PRs which don't change the contents of the built package (e.g. changes to the README, etc.) and minor dependency upgrades don't need to be mentioned | ||
| - Add a header `## vX.Y.Z` above the unreleased items, under `## Unreleased` | ||
| - Commit and push the `CHANGELOG.md` updates | ||
| - _Normally, the changelog is the only file that needs to be updated when making a release. The package version is determined automatically as explained in the overview above._ | ||
| 3. Open a PR into `main`, wait for tests to pass, get approval, and then merge into `main`. | ||
| 4. On your local machine, check out `main`, pull, and tag the release branch merge commit with the version number: | ||
| ``` | ||
| git checkout main | ||
| git pull | ||
| git tag vX.Y.Z | ||
| git push origin vX.Y.Z | ||
| ``` | ||
| 5. Build the release artifacts: | ||
|
|
||
| - [Install `uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed on your machine | ||
|
|
||
| - Ensure your git environment inside the `Kaleido/` directory is totally clean, i.e. `git status` returns the following: | ||
|
|
||
| ``` | ||
| On branch main | ||
| Your branch is up to date with 'origin/main'. | ||
|
|
||
| nothing to commit, working tree clean | ||
| ``` | ||
|
|
||
| - If needed, stash or delete/move files to get to a clean environment. This is important because `setuptools-git-versioning` will not generate the correct version number if you have untracked or changed files present. | ||
|
|
||
| - Build the package: | ||
| ``` | ||
| cd src/py/ | ||
| uv build | ||
| ``` | ||
| - Two artifacts will be added to `src/py/dist`. Ensure that they have the correct filenames: | ||
| - `kaleido-X.Y.Z-py3-none-any.whl` | ||
| - `kaleido-X.Y.Z.tar.gz` | ||
| 6. Release on GitHub: | ||
| - Go to https://github.com/plotly/Kaleido/releases and click "Draft a new release" | ||
| - Select the `vX.Y.Z` tag you created previously | ||
| - Copy and paste the relevant changelog section into the release notes | ||
| - Upload the `.whl` and `.tar.gz` build artifacts | ||
| 7. Release on PyPI: | ||
| - Install the `twine` Python package if not already installed (`pip install twine`) | ||
| - `cd` into the `dist/` directory | ||
| - Use `twine` to upload the artifacts to PyPI: | ||
| ``` | ||
| twine upload kaleido-X.Y.Z* | ||
| ``` | ||
| - You will need to enter an API token proving you have permission to publish | ||
|
|
||
| That's it! Make sure to visit https://pypi.org/project/kaleido to verify that the new package version is available. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.