From dcdbc5d49d951ac677a1e39039c3506aaf65304c Mon Sep 17 00:00:00 2001 From: koplas Date: Fri, 6 Jun 2025 22:49:11 +0200 Subject: [PATCH] Add semver breaking changes detection --- .github/workflows/go.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b86309f..bed2620 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v4 @@ -38,3 +39,27 @@ jobs: - name: Tests run: go test -v ./... + + run_modver: + runs-on: ubuntu-latest + needs: build # Only run when build job was successful + if: ${{ github.event_name == 'pull_request' && success() }} + permissions: + contents: read # Modver needs to read the repo content + pull-requests: write # Modver needs to write comments/status on PRs + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Modver needs full history for comparison + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "stable" + + - name: Modver + uses: bobg/modver@v2.5.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + pull_request_url: https://github.com/${{ github.repository }}/pull/${{ github.event.number }}