astral-sh / ruff-pre-commit

A pre-commit hook for Ruff.
Apache License 2.0
802 stars 38 forks source link

feat(workflow): auto release on tag creation #81

Closed CoderJoshDK closed 3 months ago

CoderJoshDK commented 3 months ago

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.