-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow to validate api surface changes
- Loading branch information
1 parent
5e24963
commit 748e0a5
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Validate Public API surface changes | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
branches: [ 'main' ] | ||
paths: ['msgraph/generated/**'] | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
issues: write | ||
|
||
jobs: | ||
validate-public-api-surface: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: microsoftgraph/kiota-dom-export-diff-tool/export@main | ||
id: generatePatch | ||
- uses: microsoftgraph/kiota-dom-export-diff-tool/tool@main | ||
if: ${{ steps.generatePatch.outputs.patchFilePath != '' }} | ||
with: | ||
path: ${{ steps.generatePatch.outputs.patchFilePath }} | ||
fail-on-removal: true | ||
id: diff | ||
- uses: microsoftgraph/kiota-dom-export-diff-tool/comment@main | ||
if: ${{ always() && steps.generatePatch.outputs.patchFilePath != '' && steps.diff.outputs.hasExplanations != '' && github.event_name == 'pull_request' }} | ||
continue-on-error: true | ||
with: | ||
comment: ${{ steps.diff.outputs.explanationsFilePath }} | ||
prNumber: ${{ github.event.pull_request.number }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload patch file as artifact | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
continue-on-error: true | ||
with: | ||
name: patch | ||
path: '*.patch' | ||
- name: Upload explanations file as artifact | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
continue-on-error: true | ||
with: | ||
name: explanations | ||
path: 'explanations.txt' |