ci: create a Gitea release when a v* tag is pushed
CI / Formatação e clippy (push) Successful in 26s
CI / Testes (Linux) (push) Successful in 22s
CI / Compila o app desktop (Linux) (push) Successful in 4m23s
CI / Auditoria de dependências (push) Successful in 5m31s

Notes come from the matching CHANGELOG.md section. The macOS and Windows
binaries the old release workflow built need runners this Gitea does not have.
The CI also ignores .wolf, .claude and the release files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-10-30 12:37:01 -03:00
1 parent 9bcdd6c139
commit 0e31d28342
3 files changed
+61 -2

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Imprime as notas de uma release: a seção do CHANGELOG.md daquela versão, ou o
# log de commits desde a tag anterior quando o changelog não tem a seção.
#
# scripts/release-notes.sh v1.2.3
set -euo pipefail
tag=${1:?uso: release-notes.sh <tag>}
version=${tag#v}
section=""
if [ -f CHANGELOG.md ]; then
section=$(awk -v head="## [$version]" '
index($0, head) == 1 { found = 1; next }
found && /^## \[/ { exit }
found && /^\[[^]]+\]: / { next }
found { print }
' CHANGELOG.md)
fi
if [ -n "$(printf '%s' "$section" | tr -d '[:space:]')" ]; then
printf '%s\n' "$section"
else
previous=$(git describe --tags --abbrev=0 "$tag^" 2>/dev/null || true)
echo "## Mudanças${previous:+ desde $previous}"
echo
git log --no-merges --format='- %s (%h)' "${previous:+$previous..}$tag"
fi