-
Notifications
You must be signed in to change notification settings - Fork 83
36 lines (35 loc) · 1023 Bytes
/
breaking.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This script is provided by github.com/bool64/dev.
name: breaking
on:
pull_request:
env:
GO111MODULE: "on"
jobs:
broken-changes:
concurrency:
group: broken-changes-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Checkout code
uses: actions/checkout@v4
- name: Install gorelease
run: test -e ~/go/bin/gorelease || go install golang.org/x/exp/cmd/gorelease@latest
- name: Check broken API changes
run: gorelease -base=$GITHUB_BASE_REF 2>&1 > changes.txt | true
- name: Print API changes
run: cat changes.txt
- name: Comment Report
if: always()
uses: marocchino/sticky-pull-request-comment@v2
with:
path: changes.txt
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
header: gorelease