diff --git a/.github/workflows/fortress-test-matrix.yml b/.github/workflows/fortress-test-matrix.yml index 833235d..9b9d28f 100644 --- a/.github/workflows/fortress-test-matrix.yml +++ b/.github/workflows/fortress-test-matrix.yml @@ -364,8 +364,16 @@ jobs: # Process both test failures and build failures - # First handle regular test failures - if grep -oE 'FAIL:.*\(([^)]+)\)' test-failures.txt 2>/dev/null | sed -E 's/.*\(([^):]+)[^)]*\).*/\1/' | sort -u > "$TEMP_PACKAGES"; then + # Extract package names from test failures using a named regex and + # intermediate steps + FAIL_REGEX='FAIL:.*\(([^)]+)\)' + PACKAGE_LINE_REGEX='.*\(([^):]+)[^)]*\).*' + + grep -oE "$FAIL_REGEX" test-failures.txt 2>/dev/null > temp-fail-lines.txt + sed -E "s/$PACKAGE_LINE_REGEX/\1/" temp-fail-lines.txt | sort -u > "$TEMP_PACKAGES" + rm temp-fail-lines.txt + + if [[ -s "$TEMP_PACKAGES" ]]; then echo "📦 Found packages with test failures:" cat "$TEMP_PACKAGES" diff --git a/.goreleaser.yml b/.goreleaser.yml index 957a410..cd97a82 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -30,7 +30,7 @@ builds: # Archives # --------------------------- archives: - - id: go-template + - id: go-sanitize name_template: >- {{- .ProjectName }}_ {{- .Version }}_