Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/new_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tag on version bump

on:
push:
branches:
- main

permissions:
contents: write

jobs:
tag:
name: Create tag if version changed
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get current version from pyproject.toml
id: current
run: |
VERSION=$(grep '^version =' pyproject.toml | cut -d '"' -f2)
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Get previous version from main~1
id: previous
run: |
git checkout HEAD~1
PREV_VERSION=$(grep '^version =' pyproject.toml | cut -d '"' -f2)
echo "version=$PREV_VERSION" >> $GITHUB_OUTPUT

- name: Compare versions and create tag if changed
if: steps.current.outputs.version != steps.previous.outputs.version
run: |
git config user.name "github-actions[bot]"

TAG="v${{ steps.current.outputs.version }}"
git tag "$TAG"
git push origin "$TAG"
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ runBuild:
$(UVE) build

runBump:
cz bump --files-only --yes --changelog
$(UVE) run cz bump --files-only --yes --changelog
git add .
cz version --project | xargs -i git commit -am "bump: release {}"
$(UVE) run cz version --project | xargs -i git commit -am "bump: release {}"

runUV:
$(UVE) run $(CMD)
Expand Down
2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pre-commit:
stage_fixed: true
- name: ruff
glob: "*.py"
run: \[\[ test $RUFF != "" ]] && $RUFF check {staged_files} --fix || ruff check {staged_files} --fix
run: ruff check {staged_files} --fix
stage_fixed: true
- name: uv-export
run: make runLock && git add \*/requirements\*\.txt
Expand Down
Loading