Skip to content

Commit f8caef5

Browse files
committed
ci: adds a workflow to validate public API surface changes
1 parent 0df489c commit f8caef5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Validate Public API surface changes
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
pull_request:
7+
branches: [ 'main' ]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
issues: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: microsoftgraph/kiota-dom-export-diff-tool/export@main
20+
id: generatePatch
21+
- uses: microsoftgraph/kiota-dom-export-diff-tool/tool@main
22+
if: ${{ steps.generatePatch.outputs.patchFilePath != '' }}
23+
with:
24+
path: ${{ steps.generatePatch.outputs.patchFilePath }}
25+
fail-on-removal: true
26+
id: diff
27+
- uses: microsoftgraph/kiota-dom-export-diff-tool/comment@main
28+
if: ${{ always() && steps.generatePatch.outputs.patchFilePath != '' && steps.diff.outputs.explanations != '' && github.event_name == 'pull_request' }}
29+
continue-on-error: true
30+
with:
31+
comment: ${{ steps.diff.outputs.explanations }}
32+
prNumber: ${{ github.event.pull_request.number }}
33+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Upload patch file as artifact
35+
if: always()
36+
uses: actions/upload-artifact@v4
37+
continue-on-error: true
38+
with:
39+
name: patch
40+
path: '*.patch'

0 commit comments

Comments
 (0)