feat(releaseprep): migrate standalone tool into vociferate
This commit is contained in:
56
.gitea/workflows/push-validation.yml
Normal file
56
.gitea/workflows/push-validation.yml
Normal 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
|
||||
Reference in New Issue
Block a user