Skip to content

Generate API Diffs #458

Generate API Diffs

Generate API Diffs #458

name: Generate API Diffs
on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *' # 8am PST (16:00 UTC)
permissions:
contents: write
pull-requests: write
jobs:
generate-and-pr:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'microsoft' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Restore and build
run: |
set +e
# Find all csproj files excluding specific paths
find src -name '*.csproj' | egrep -v 'Aspire.ProjectTemplates|Aspire.Cli' | while read proj; do
./dotnet.sh build "$proj" -f net8.0 --configuration Release --no-incremental /t:"Build;GenAPIGenerateReferenceAssemblySource"
done
continue-on-error: true
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
app-id: ${{ secrets.ASPIRE_BOT_APP_ID }}
private-key: ${{ secrets.ASPIRE_BOT_PRIVATE_KEY }}
- name: Create or update pull request
uses: ./.github/actions/create-pull-request
with:
token: ${{ steps.app-token.outputs.token }}
branch: update-api-diffs
base: main
labels: |
NO-MERGE
title: "[Automated] Update API Surface Area"
body: "Auto-generated update to the API surface to compare current surface vs latest release. This should only be merged once this surface area ships in a new release."