chore(main): release 2.0.0 #4508
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check proto breaks | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- edited | |
jobs: | |
check-if-code-change: | |
runs-on: ubuntu-latest | |
outputs: | |
change: ${{ steps.check.outputs.change }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
go-version: '1.20' | |
fetch-depth: 0 | |
- run: | | |
if git --no-pager diff --exit-code origin/main...HEAD -- . ':!docs' ':!*.md'; then | |
echo "::set-output name=change::false" | |
else | |
echo "::set-output name=change::true" | |
fi | |
id: check | |
check-proto-break: | |
needs: check-if-code-change | |
if: ${{ needs.check-if-code-change.outputs.change == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- run: go install github.com/bufbuild/buf/cmd/[email protected] | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check if PR is breaking | |
run: | | |
if [[ "${{ github.event.pull_request.title }}" == *'!'* ]]; then | |
echo "PR is a breaking change by title" | |
exit 0 | |
else | |
echo "Checking if PR is a breaking change" | |
buf breaking --path ./api/protobuf/ --against '.git#branch=origin/main' | |
fi |