File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Gorelease comments public API changes to pull request.
2
+ name : gorelease
3
+ on :
4
+ pull_request :
5
+
6
+ # Cancel the workflow in progress in newer build is about to start.
7
+ concurrency :
8
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9
+ cancel-in-progress : true
10
+
11
+ env :
12
+ GO_VERSION : 1.19.x
13
+ jobs :
14
+ gorelease :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Install Go stable
18
+ if : env.GO_VERSION != 'tip'
19
+ uses : actions/setup-go@v3
20
+ with :
21
+ go-version : ${{ env.GO_VERSION }}
22
+ - name : Checkout code
23
+ uses : actions/checkout@v2
24
+ - name : Gorelease cache
25
+ uses : actions/cache@v2
26
+ with :
27
+ path : |
28
+ ~/go/bin/gorelease
29
+ key : ${{ runner.os }}-gorelease-generic
30
+ - name : Gorelease
31
+ id : gorelease
32
+ run : |
33
+ test -e ~/go/bin/gorelease || go install golang.org/x/exp/cmd/gorelease@latest
34
+ OUTPUT=$(gorelease 2>&1 || exit 0)
35
+ echo "${OUTPUT}"
36
+ OUTPUT="${OUTPUT//$'\n'/%0A}"
37
+ echo "::set-output name=report::$OUTPUT"
38
+ - name : Comment Report
39
+ continue-on-error : true
40
+ uses : marocchino/sticky-pull-request-comment@v2
41
+ with :
42
+ header : gorelease
43
+ message : |
44
+ ### Go API Changes
45
+
46
+ <pre>
47
+ ${{ steps.gorelease.outputs.report }}
48
+ </pre>
You can’t perform that action at this time.
0 commit comments