-
Notifications
You must be signed in to change notification settings - Fork 829
52 lines (48 loc) · 1.65 KB
/
Copy pathapi-diff.yml
File metadata and controls
52 lines (48 loc) · 1.65 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
name: API Diff
on:
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch:
inputs:
baseline_version:
description: >-
Override the baseline version to compare against.
Defaults to <api.diff.baseline.version> in pom.xml.
required: false
default: ""
permissions:
contents: read
jobs:
api-diff:
if: ${{ !startsWith(github.head_ref, 'release-please--branches--') }}
runs-on: ubuntu-24.04
env:
# Empty unless overridden via workflow_dispatch; the api-diff task then
# falls back to <api.diff.baseline.version> in pom.xml.
API_DIFF_BASELINE_VERSION: ${{ inputs.baseline_version }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
with:
version: v2026.7.0
sha256: 0744cb3c303baf0d308ff7b112ed41f22abb6029cb5644fd3a8ce74b29f16a68
- name: Cache local Maven repository
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Run japicmp API diff
run: mise run api-diff
- name: Check docs/apidiffs is up to date
run: |
if ! git diff --exit-code -- docs/apidiffs; then
echo "::error::Published API surface changed but docs/apidiffs is stale."
echo "Run 'mise run api-diff' locally and commit the updated docs/apidiffs."
exit 1
fi