Detect public api changes #25
Workflow file for this run
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
name: Detect public API changes | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
branches: | |
- develop | |
jobs: | |
build: | |
runs-on: macos-14-xlarge # Apple Silicon Runner | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: n1hility/cancel-previous-runs@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Select latest Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.1' | |
- name: 🔍 Detect Changes | |
run: | | |
for module in $modules | |
do | |
echo Generating API Definition for $module | |
Scripts/generate_public_interface_definition.sh ${branch} ${baseRepo} $module | |
./Scripts/compare_public_interface_definition.swift api_dump_comparison.json api_dump.json $module | |
done | |
env: | |
branch: '${{github.event.pull_request.base.ref}}' | |
baseRepo: '${{github.server_url}}/${{github.repository}}.git' | |
modules: "Adyen AdyenDropIn" # AdyenActions AdyenCard AdyenEncryption AdyenComponents AdyenSession AdyenWeChatPay AdyenCashAppPay AdyenTwint AdyenDelegatedAuthentication" | |
- name: 📝 Comment on PR | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: "${{ github.workspace }}/api_comparison.md" | |
comment_tag: api_changes | |
mode: recreate |