## Summary
I originally tested this functionality in `uv-pre-commit`. And that is
why when moving it over, I ended up copying the URL for that release. I
am sorry for all the broken code I have introduced. I feel so bad. I am
at least glad I realized before a new `ruff` release came out.
As mentioned in #82, there are issues with having a workflow triggered
by the work done by a different workflow. To keep the functionality of
the auto release workflow, the two files are being merged into one.
Closes#82
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
`uv` is great. So we should use it where we can.
The cache had to be removed because the workflow breaks currently.
https://github.com/actions/setup-python/issues/822
When this is solved, caching can be brought back in.
## Test Plan
Ran workflow on my local repo.
## Summary
Add a GitHub workflow for creating a new release, automatically, when a
new tag is created.
This solves #78. The code is very similar to the changes added in
https://github.com/astral-sh/uv-pre-commit/pull/6
The primary difference, is that the URL points to ruff and this one
checks for if the tag starts with a `v`, but it is optional. This lets
you change ruff versions to not have a `v` in the future. Although the
`mirror.py` will need to be updated.
Speaking of updates to `mirror.py`, I ran `ruff` on it and updated the
`subprocess` to raise an error on failure.
## Test Plan
Locally tested.
I got some feedback on Mastodon that it wasn't clear how to use the
linter and formatter together in pre-commit.
This also removes `--exit-non-zero-on-fix`, since pre-commit already
exits if files are changed, and changes our recommendation to always put
the formatter after the linter, since if a previous tool ends up
committing changes, pre-commit should fail anyway.
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
<!-- What's the purpose of the change? What does it do, and why? -->
- `pre-commit-mirror-maker` is not suitable for generating multiple
hooks in single `.pre-commit-hooks.yaml` file.
- So replaced the script and github workflows.
## Test Plan
<!-- How was it tested? -->
- Update `pyproject.toml`'s `ruff==0.0.290` into `ruff==0.0.289`, and
run the script.
```sh
$ python3 mirror.py
...
```