Skip to content

Commit 3fdf9d5

Browse files
authored
Update workflow to scan for PublicAPI references
1 parent fa3751f commit 3fdf9d5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/prevent-publicapi-addition.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ jobs:
99
- name: Checkout code
1010
uses: actions/checkout@v3
1111

12-
- name: Scan for accidental PublicAPI text file references
12+
- name: Scan for accidental PublicAPI references
1313
run: |
1414
set -e # Stop on first error
15-
15+
1616
# Find all .csproj files and check for unwanted lines
1717
if find . -name "*.csproj" -exec grep -q "PublicAPI.Shipped.txt" {} \; || \
18-
find . -name "*.csproj" -exec grep -q "PublicAPI.Unshipped.txt" {} \; then
18+
find . -name "*.csproj" -exec grep -q "PublicAPI.Unshipped.txt" {} \;
19+
then
1920
echo "Error: PublicAPI.Shipped.txt or PublicAPI.Unshipped.txt detected in a .csproj file."
2021
exit 1
21-
else
22-
echo "All good - No PublicAPI references found."
2322
fi
23+
24+
echo "All good - No PublicAPI references found."

0 commit comments

Comments
 (0)