Compare commits
13
Commits
5e8660ebd1
..
v0.6.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
170c8ea981 | ||
|
|
7dcf04c568 | ||
|
|
b3d80f1ae3 | ||
|
|
2410c16559 | ||
|
|
e25da626eb | ||
|
|
8d17f889f0 | ||
|
|
40834fdfce | ||
|
|
b349586755 | ||
|
|
109d62efa3 | ||
|
|
05a61bba86 | ||
|
|
2242ffd0cb | ||
|
|
eb050d5b84 | ||
|
|
f997c15873 |
+20
-1
@@ -4,8 +4,11 @@ name: go-lib/util
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
|
- push
|
||||||
- tag
|
- tag
|
||||||
ref:
|
ref:
|
||||||
|
include:
|
||||||
|
- refs/heads/**
|
||||||
- refs/tags/v*
|
- refs/tags/v*
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -21,24 +24,40 @@ steps:
|
|||||||
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||||
- govulncheck -json ./... > vulncheck.json
|
- govulncheck -json ./... > vulncheck.json
|
||||||
|
|
||||||
|
- name: release-notes
|
||||||
|
image: golang:1.25.8
|
||||||
|
commands:
|
||||||
|
- bash scripts/generate-release-notes.sh
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: golang:1.25.8
|
image: golang:1.25.8
|
||||||
commands:
|
commands:
|
||||||
- tar czf .build/sources.tar.gz --exclude=.build --exclude=.git --exclude=.drone.yml .
|
- tar czf .build/sources.tar.gz --exclude=.build --exclude=.git --exclude=.drone.yml .
|
||||||
when:
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
|
base_url: https://scm.yoorie.de
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
files:
|
files:
|
||||||
- .build/coverage.txt
|
- .build/coverage.txt
|
||||||
- .build/sources.tar.gz
|
- .build/sources.tar.gz
|
||||||
|
- .build/release-notes.md
|
||||||
title: ${DRONE_TAG}
|
title: ${DRONE_TAG}
|
||||||
note: "Release ${DRONE_TAG}\n\nCoverage report: coverage.txt"
|
note_from_file: .build/release-notes.md
|
||||||
when:
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on Conventional Changelog categories.
|
||||||
|
|
||||||
|
## [v0.6.0] - 2026-03-29
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added tag-based Gitea release workflow with attached artifacts.
|
||||||
|
- Added automatic release notes generation from commit history.
|
||||||
|
- Added release process documentation.
|
||||||
|
- Added project standards files, hooks, and reconciliation scripts.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated build container configuration.
|
||||||
|
- Generalized the Drone build flow for library usage.
|
||||||
|
- Improved Drone test execution, coverage reporting, and CI quality gates.
|
||||||
|
- Updated documentation structure and naming consistency.
|
||||||
|
- Synced AGENTS and Definition of Done templates.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed Drone YAML schema issues for trigger and status array types.
|
||||||
|
- Fixed Drone trigger behavior so push builds run on branches.
|
||||||
|
- Fixed Linux coverage flag handling in CI.
|
||||||
|
- Fixed formatting issues in Windows-specific code.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
- Improved README and DoD documentation clarity.
|
||||||
|
- Enforced markdownlint rules for DoD documentation.
|
||||||
|
|
||||||
|
### CI
|
||||||
|
|
||||||
|
- Added `go vet` check to pipeline.
|
||||||
|
- Added coverage threshold validation (80%) in CI.
|
||||||
|
- Moved coverage validation into a dedicated script.
|
||||||
|
- Configured pipeline behavior: build on push and tag, release only on tag.
|
||||||
|
|
||||||
|
## [v0.5.0] - 2021-03-03
|
||||||
|
|
||||||
|
### Legacy Changes
|
||||||
|
|
||||||
|
- Added README.
|
||||||
|
- Updated modules and build setup.
|
||||||
|
- Renamed pipeline.
|
||||||
|
|
||||||
|
[v0.6.0]: https://scm.yoorie.de/git/go-lib/util/compare/v0.5.0...v0.6.0
|
||||||
|
[v0.5.0]: https://scm.yoorie.de/git/go-lib/util/compare/v0.0.4...v0.5.0
|
||||||
@@ -57,4 +57,4 @@ func main() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
Copyright © 2023 yoorie.de
|
Copyright © 2026 yoorie.de
|
||||||
|
|||||||
Executable
+71
@@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Generate release notes from commits since the last tag
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
CURRENT_TAG="${1:-${DRONE_TAG}}"
|
||||||
|
OUTPUT_FILE="${2:-.build/release-notes.md}"
|
||||||
|
|
||||||
|
if [ -z "$CURRENT_TAG" ]; then
|
||||||
|
echo "Error: Current tag not provided"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find the previous tag
|
||||||
|
PREVIOUS_TAG=$(git describe --tags --abbrev=0 "$CURRENT_TAG"^ 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$OUTPUT_FILE")"
|
||||||
|
|
||||||
|
# Start release notes
|
||||||
|
{
|
||||||
|
echo "# Release $CURRENT_TAG"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ -n "$PREVIOUS_TAG" ]; then
|
||||||
|
echo "**Changes since $PREVIOUS_TAG:**"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Extract commits and group by type (feat, fix, docs, ci, etc.)
|
||||||
|
git log "$PREVIOUS_TAG..$CURRENT_TAG" --pretty=format:"%s" | while read -r commit; do
|
||||||
|
# Parse conventional commits
|
||||||
|
if [[ $commit =~ ^([a-z]+)(\(.+\))?:\ (.+)$ ]]; then
|
||||||
|
TYPE="${BASH_REMATCH[1]}"
|
||||||
|
SCOPE="${BASH_REMATCH[2]}"
|
||||||
|
MESSAGE="${BASH_REMATCH[3]}"
|
||||||
|
|
||||||
|
case "$TYPE" in
|
||||||
|
feat)
|
||||||
|
echo "- ✨ **Feature**${SCOPE}: $MESSAGE" ;;
|
||||||
|
fix)
|
||||||
|
echo "- 🐛 **Fix**${SCOPE}: $MESSAGE" ;;
|
||||||
|
docs)
|
||||||
|
echo "- 📖 **Docs**${SCOPE}: $MESSAGE" ;;
|
||||||
|
ci)
|
||||||
|
echo "- 🔧 **CI**${SCOPE}: $MESSAGE" ;;
|
||||||
|
test)
|
||||||
|
echo "- ✅ **Test**${SCOPE}: $MESSAGE" ;;
|
||||||
|
refactor)
|
||||||
|
echo "- ♻️ **Refactor**${SCOPE}: $MESSAGE" ;;
|
||||||
|
perf)
|
||||||
|
echo "- ⚡ **Performance**${SCOPE}: $MESSAGE" ;;
|
||||||
|
*)
|
||||||
|
echo "- 📝 $commit" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "- 📝 $commit"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Initial release"
|
||||||
|
echo ""
|
||||||
|
git log "$CURRENT_TAG" --pretty=format:"- 📝 %s" | head -20
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "---"
|
||||||
|
echo "See [all changes](https://scm.yoorie.de/git/go-lib/util/compare/$PREVIOUS_TAG...$CURRENT_TAG)"
|
||||||
|
|
||||||
|
} > "$OUTPUT_FILE"
|
||||||
|
|
||||||
|
echo "Release notes generated: $OUTPUT_FILE"
|
||||||
|
cat "$OUTPUT_FILE"
|
||||||
Reference in New Issue
Block a user