-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the release workflow more resilient
## Summary Currently, it is possible to create a tag and then have the release fail. Since we can't edit the tag (#4468), this reworks the release so that the tag is created inside the release workflow. This leaves as a failure mode that we have published to pypi but then creating the tag or GitHub release doesn't work, but in this case we can restart and the pypi upload is just skipped because we use the skip existing option. The release workflow is started by a workflow dispatch with the tag instead of creating the tag yourself. You can start the release workflow without a tag to do a test run. This also adds docs on how to release and a small style improvement for the maturin integration. ## Test Plan Normal CI, thorough review and hoping that the next release will work
- Loading branch information
Showing
3 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Creating a new release | ||
|
||
This is a guide how to create a new ruff release | ||
|
||
1. Update the version with `rg 0.0.269 --files-with-matches | xargs sed -i 's/0.0.269/0.0.270/g'` | ||
2. Update [BREAKING_CHANGES.md](BREAKING_CHANGES.md) | ||
3. Create a PR with the version and BREAKING_CHANGES.md updated | ||
4. Merge the PR | ||
5. Run the release workflow with the tag (without starting `v`) as input. Make sure main has your merged PR as last commit | ||
6. The release workflow will do the following: | ||
1. Build all the assets. If this fails (even though we tested in step 4), we haven’t tagged or uploaded anything, you can restart after pushing a fix | ||
2. Upload to pypi | ||
3. Create a git tag (from pyproject.toml) and push git tag. We create the git tag only here because we can't change it ([#4468](https://github.com/charliermarsh/ruff/issues/4468)), so we want to make sure everything up to and including publishing to pypi worked | ||
4. Attach artifacts to draft GitHub release | ||
5. Trigger downstream repositories. This can fail without causing fallout, it is possible (if inconvenient) to trigger the downstream jobs manually | ||
7. Create release notes in GitHub UI (https://github.com/charliermarsh/ruff/releases/new) | ||
8. If needed, [update the schemastore](https://github.com/charliermarsh/ruff/blob/main/scripts/update_schemastore.py) | ||
9. If needed, update ruff-lsp and ruff-vscode |