Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: adds a workflow to validate public API surface changes #2626

Merged
merged 6 commits into from
Aug 29, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/validatePublicAPISurface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Validate Public API surface changes

on:
workflow_dispatch:
push:
pull_request:
branches: [ 'main' ]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
build:
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.explanations != '' && github.event_name == 'pull_request' }}
andrueastman marked this conversation as resolved.
Show resolved Hide resolved
continue-on-error: true
with:
comment: ${{ steps.diff.outputs.explanations }}
prNumber: ${{ github.event.pull_request.number }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload patch file as artifact
andrueastman marked this conversation as resolved.
Show resolved Hide resolved
if: always()
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: patch
path: '*.patch'
Loading