Automate releases from PR titles and clean up CI workflows.
Add release and PR title checks, shared CI scripts, Gitea PR template, and align pyproject.toml to v0.3.1. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
2bb361e3a3
commit
a8491c005c
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
# shellcheck source=common.sh
|
||||
source "${SCRIPT_DIR}/common.sh"
|
||||
|
||||
COMMIT_MSG="${1:-${COMMIT_MSG:-}}"
|
||||
|
||||
if [[ -z "$COMMIT_MSG" ]]; then
|
||||
echo "Usage: parse-merge-commit.sh <commit-message>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PR_TITLE=$(extract_pr_title_from_merge_commit "$COMMIT_MSG")
|
||||
|
||||
if [[ -z "$PR_TITLE" ]]; then
|
||||
bump="skip"
|
||||
else
|
||||
bump_type=$(bump_type_from_title "$PR_TITLE")
|
||||
if [[ -n "$bump_type" ]]; then
|
||||
bump="$bump_type"
|
||||
else
|
||||
bump="skip"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
|
||||
{
|
||||
echo "pr_title=${PR_TITLE}"
|
||||
echo "bump=${bump}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "pr_title=${PR_TITLE}"
|
||||
echo "bump=${bump}"
|
||||
fi
|
||||
Reference in New Issue
Block a user