feat(releaseprep): migrate standalone tool into vociferate

This commit is contained in:
Micheal Wilkinson
2026-03-20 18:26:11 +00:00
parent 2060af6a78
commit caf0b6db76
9 changed files with 614 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
name: Push Validation
on:
push:
branches:
- "**"
tags-ignore:
- "*"
jobs:
validate:
runs-on: ubuntu-latest
container: docker.io/catthehacker/ubuntu:act-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.26.1'
check-latest: true
cache: true
cache-dependency-path: go.sum
- name: Run full unit test suite with coverage
run: |
set -euo pipefail
go test -covermode=atomic -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
- name: Recommend next release tag on main pushes
if: ${{ github.ref == 'refs/heads/main' }}
run: |
set -euo pipefail
if recommended_tag="$(go run ./cmd/releaseprep --recommend --root . 2>release-recommendation.err)"; then
{
echo
echo '## Release Recommendation'
echo
echo "- Recommended next tag: \`${recommended_tag}\`"
} >> "$GITHUB_STEP_SUMMARY"
else
recommendation_error="$(tr '\n' ' ' < release-recommendation.err | sed 's/[[:space:]]\+/ /g' | sed 's/^ //; s/ $//')"
echo "::warning::${recommendation_error}"
{
echo
echo '## Release Recommendation'
echo
echo "- No recommended tag emitted: ${recommendation_error}"
} >> "$GITHUB_STEP_SUMMARY"
fi