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
23 changes: 18 additions & 5 deletions .github/workflows/semantic-release-uv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ on:
released:
description: "Whether a new release was created"
value: ${{ jobs.release.outputs.released }}
version:
description: "The released version (e.g. 1.2.3)"
value: ${{ jobs.release.outputs.version }}
tag:
description: "The release tag (e.g. v1.2.3)"
value: ${{ jobs.release.outputs.tag }}

jobs:
release:
Expand All @@ -40,6 +46,8 @@ jobs:
name: pypi
outputs:
released: ${{ steps.release.outputs.released }}
version: ${{ steps.release.outputs.version }}
tag: ${{ steps.release.outputs.tag }}

steps:
- name: Checkout
Expand Down Expand Up @@ -69,13 +77,18 @@ jobs:
exit_code=$?
set -e
echo "$output"
if echo "$output" | grep -q "No release will be made"; then
echo "released=false" >> "$GITHUB_OUTPUT"
elif [ $exit_code -ne 0 ]; then
echo "Semantic release failed with exit code $exit_code"
exit $exit_code
if [ $exit_code -ne 0 ]; then
if echo "$output" | grep -q "No release will be made"; then
echo "released=false" >> "$GITHUB_OUTPUT"
else
echo "Semantic release failed with exit code $exit_code"
exit $exit_code
fi
else
echo "released=true" >> "$GITHUB_OUTPUT"
tag=$(git describe --tags --abbrev=0)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "version=${tag#v}" >> "$GITHUB_OUTPUT"
fi

- name: Build package
Expand Down
2 changes: 2 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Minimum prek version for builtin hooks and TOML config support
minimum_prek_version = "0.3.2"
# All available: commit-msg, post-checkout, post-commit, post-merge, post-rewrite, pre-commit, pre-merge-commit, pre-push, pre-rebase, prepare-commit-msg
default_install_hook_types = ["commit-msg", "pre-commit", "pre-push"]

[[repos]]
repo = "builtin"
Expand Down