From 5f142c88f30aa41c36d30462894141d06add2918 Mon Sep 17 00:00:00 2001 From: mcollinscodat Date: Tue, 25 Aug 2026 17:45:27 +0100 Subject: [PATCH 1/3] feat/CONN-1664-release-stubs: point the five generated products' workflows at Codat SDK Codegen .github/workflows/{bank_feeds,lending,platform,sync_for_expenses,sync_for_payables}_generate.yaml - the old Speakeasy generate call becomes a stub that says generation moved and exits 0 .github/workflows/{bank_feeds,lending,platform,sync_for_expenses,sync_for_payables}_release.yaml - the old Speakeasy publish call becomes a stub that hands the release to the central publish pipeline as a publish-csharp repository dispatch --- .github/workflows/bank_feeds_generate.yaml | 26 +++++----- .github/workflows/bank_feeds_release.yaml | 47 ++++++++++++++++--- .github/workflows/lending_generate.yaml | 26 +++++----- .github/workflows/lending_release.yaml | 47 ++++++++++++++++--- .github/workflows/platform_generate.yaml | 26 +++++----- .github/workflows/platform_release.yaml | 47 ++++++++++++++++--- .../workflows/sync_for_expenses_generate.yaml | 26 +++++----- .../workflows/sync_for_expenses_release.yaml | 47 ++++++++++++++++--- .../workflows/sync_for_payables_generate.yaml | 26 +++++----- .../workflows/sync_for_payables_release.yaml | 47 ++++++++++++++++--- 10 files changed, 275 insertions(+), 90 deletions(-) diff --git a/.github/workflows/bank_feeds_generate.yaml b/.github/workflows/bank_feeds_generate.yaml index ef99328c0..2fd103af1 100644 --- a/.github/workflows/bank_feeds_generate.yaml +++ b/.github/workflows/bank_feeds_generate.yaml @@ -1,3 +1,7 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK +# Codegen generates this SDK and opens a versioned PR here, dispatched by the +# oas pipeline. This stub only says so. name: Generate Bank Feeds library 'on': workflow_dispatch: @@ -7,18 +11,16 @@ name: Generate Bank Feeds library type: boolean default: false set_version: - description: optionally set a specific SDK version + description: Optionally set a specific SDK version. type: string jobs: generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - speakeasy_version: latest - set_version: ${{ github.event.inputs.set_version }} - target: bank-feeds-library - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} + runs-on: ubuntu-latest + steps: + - name: Generation moved to Codat SDK Codegen + run: | + echo "::warning::This workflow no longer generates anything. bank-feeds is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + # Exits 0 because the oas pipeline still runs this workflow on every OAS + # merge; flip to exit 1 in the same change that switches the oas trigger + # to the repository dispatch, so stray runs become loud. + exit 0 diff --git a/.github/workflows/bank_feeds_release.yaml b/.github/workflows/bank_feeds_release.yaml index e92efb991..3f6f67faf 100644 --- a/.github/workflows/bank_feeds_release.yaml +++ b/.github/workflows/bank_feeds_release.yaml @@ -1,3 +1,15 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Publishing no longer runs in this repo. The packaging checks, the upload to +# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml +# in Codat SDK Codegen - no check has been dropped, they just moved. This stub +# only forwards the release trigger there, authenticated with a short-lived +# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# +# Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the +# next merge publish -rc1 rather than . A plain +# `dotnet add package` takes the newest stable version, so only people who ask +# for the rc by name get it. Clear the variable once the real version has been +# promoted. name: Release Bank Feeds library 'on': push: @@ -5,11 +17,34 @@ name: Release Bank Feeds library - bank-feeds/RELEASES.md branches: - main + workflow_dispatch: {} +concurrency: publish-bank-feeds-csharp jobs: publish: - uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} - nuget_api_key: ${{ secrets.NUGET_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: Check the App secrets are set + env: + APP_ID_SET: ${{ secrets.PUBLISH_TRIGGER_APP_ID != '' }} + APP_KEY_SET: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY != '' }} + run: | + if [ "$APP_ID_SET" != "true" ] || [ "$APP_KEY_SET" != "true" ]; then + echo "::error::PUBLISH_TRIGGER_APP_ID / PUBLISH_TRIGGER_APP_PRIVATE_KEY secrets are not set - needed to mint the token that sends the publish-csharp repository dispatch to codat-internal/sdk-codegen" + exit 1 + fi + - name: Mint a token from the GitHub App + id: app_token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.PUBLISH_TRIGGER_APP_ID }} + private-key: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY }} + owner: codat-internal + repositories: sdk-codegen + - name: Hand the release to the central publish pipeline + run: | + curl --fail-with-body --silent --show-error -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ steps.app_token.outputs.token }}" \ + https://api.github.com/repos/codat-internal/sdk-codegen/dispatches \ + -d '{"event_type": "publish-csharp", "client_payload": {"product": "bank-feeds", "sha": "${{ github.sha }}", "sdk_repo": "${{ github.repository }}", "prerelease": "${{ vars.PUBLISH_PRERELEASE }}"}}' + echo "publish-csharp dispatch sent to codat-internal/sdk-codegen for bank-feeds @ ${{ github.sha }}${{ vars.PUBLISH_PRERELEASE && format(' as a {0} pre-release', vars.PUBLISH_PRERELEASE) || '' }}" diff --git a/.github/workflows/lending_generate.yaml b/.github/workflows/lending_generate.yaml index 1e5e7dda0..93bcaab3b 100644 --- a/.github/workflows/lending_generate.yaml +++ b/.github/workflows/lending_generate.yaml @@ -1,3 +1,7 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK +# Codegen generates this SDK and opens a versioned PR here, dispatched by the +# oas pipeline. This stub only says so. name: Generate Lending library 'on': workflow_dispatch: @@ -7,18 +11,16 @@ name: Generate Lending library type: boolean default: false set_version: - description: optionally set a specific SDK version + description: Optionally set a specific SDK version. type: string jobs: generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - speakeasy_version: latest - set_version: ${{ github.event.inputs.set_version }} - target: lending-library - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} + runs-on: ubuntu-latest + steps: + - name: Generation moved to Codat SDK Codegen + run: | + echo "::warning::This workflow no longer generates anything. lending is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + # Exits 0 because the oas pipeline still runs this workflow on every OAS + # merge; flip to exit 1 in the same change that switches the oas trigger + # to the repository dispatch, so stray runs become loud. + exit 0 diff --git a/.github/workflows/lending_release.yaml b/.github/workflows/lending_release.yaml index 67ac3fe66..3cbb9fb57 100644 --- a/.github/workflows/lending_release.yaml +++ b/.github/workflows/lending_release.yaml @@ -1,3 +1,15 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Publishing no longer runs in this repo. The packaging checks, the upload to +# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml +# in Codat SDK Codegen - no check has been dropped, they just moved. This stub +# only forwards the release trigger there, authenticated with a short-lived +# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# +# Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the +# next merge publish -rc1 rather than . A plain +# `dotnet add package` takes the newest stable version, so only people who ask +# for the rc by name get it. Clear the variable once the real version has been +# promoted. name: Release Lending library 'on': push: @@ -5,11 +17,34 @@ name: Release Lending library - lending/RELEASES.md branches: - main + workflow_dispatch: {} +concurrency: publish-lending-csharp jobs: publish: - uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} - nuget_api_key: ${{ secrets.NUGET_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: Check the App secrets are set + env: + APP_ID_SET: ${{ secrets.PUBLISH_TRIGGER_APP_ID != '' }} + APP_KEY_SET: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY != '' }} + run: | + if [ "$APP_ID_SET" != "true" ] || [ "$APP_KEY_SET" != "true" ]; then + echo "::error::PUBLISH_TRIGGER_APP_ID / PUBLISH_TRIGGER_APP_PRIVATE_KEY secrets are not set - needed to mint the token that sends the publish-csharp repository dispatch to codat-internal/sdk-codegen" + exit 1 + fi + - name: Mint a token from the GitHub App + id: app_token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.PUBLISH_TRIGGER_APP_ID }} + private-key: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY }} + owner: codat-internal + repositories: sdk-codegen + - name: Hand the release to the central publish pipeline + run: | + curl --fail-with-body --silent --show-error -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ steps.app_token.outputs.token }}" \ + https://api.github.com/repos/codat-internal/sdk-codegen/dispatches \ + -d '{"event_type": "publish-csharp", "client_payload": {"product": "lending", "sha": "${{ github.sha }}", "sdk_repo": "${{ github.repository }}", "prerelease": "${{ vars.PUBLISH_PRERELEASE }}"}}' + echo "publish-csharp dispatch sent to codat-internal/sdk-codegen for lending @ ${{ github.sha }}${{ vars.PUBLISH_PRERELEASE && format(' as a {0} pre-release', vars.PUBLISH_PRERELEASE) || '' }}" diff --git a/.github/workflows/platform_generate.yaml b/.github/workflows/platform_generate.yaml index d240c903a..a0dc2273e 100644 --- a/.github/workflows/platform_generate.yaml +++ b/.github/workflows/platform_generate.yaml @@ -1,3 +1,7 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK +# Codegen generates this SDK and opens a versioned PR here, dispatched by the +# oas pipeline. This stub only says so. name: Generate Platform library 'on': workflow_dispatch: @@ -7,18 +11,16 @@ name: Generate Platform library type: boolean default: false set_version: - description: optionally set a specific SDK version + description: Optionally set a specific SDK version. type: string jobs: generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - speakeasy_version: latest - set_version: ${{ github.event.inputs.set_version }} - target: platform-library - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} + runs-on: ubuntu-latest + steps: + - name: Generation moved to Codat SDK Codegen + run: | + echo "::warning::This workflow no longer generates anything. platform is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + # Exits 0 because the oas pipeline still runs this workflow on every OAS + # merge; flip to exit 1 in the same change that switches the oas trigger + # to the repository dispatch, so stray runs become loud. + exit 0 diff --git a/.github/workflows/platform_release.yaml b/.github/workflows/platform_release.yaml index 54421051f..6702707a3 100644 --- a/.github/workflows/platform_release.yaml +++ b/.github/workflows/platform_release.yaml @@ -1,3 +1,15 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Publishing no longer runs in this repo. The packaging checks, the upload to +# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml +# in Codat SDK Codegen - no check has been dropped, they just moved. This stub +# only forwards the release trigger there, authenticated with a short-lived +# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# +# Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the +# next merge publish -rc1 rather than . A plain +# `dotnet add package` takes the newest stable version, so only people who ask +# for the rc by name get it. Clear the variable once the real version has been +# promoted. name: Release Platform library 'on': push: @@ -5,11 +17,34 @@ name: Release Platform library - platform/RELEASES.md branches: - main + workflow_dispatch: {} +concurrency: publish-platform-csharp jobs: publish: - uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} - nuget_api_key: ${{ secrets.NUGET_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: Check the App secrets are set + env: + APP_ID_SET: ${{ secrets.PUBLISH_TRIGGER_APP_ID != '' }} + APP_KEY_SET: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY != '' }} + run: | + if [ "$APP_ID_SET" != "true" ] || [ "$APP_KEY_SET" != "true" ]; then + echo "::error::PUBLISH_TRIGGER_APP_ID / PUBLISH_TRIGGER_APP_PRIVATE_KEY secrets are not set - needed to mint the token that sends the publish-csharp repository dispatch to codat-internal/sdk-codegen" + exit 1 + fi + - name: Mint a token from the GitHub App + id: app_token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.PUBLISH_TRIGGER_APP_ID }} + private-key: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY }} + owner: codat-internal + repositories: sdk-codegen + - name: Hand the release to the central publish pipeline + run: | + curl --fail-with-body --silent --show-error -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ steps.app_token.outputs.token }}" \ + https://api.github.com/repos/codat-internal/sdk-codegen/dispatches \ + -d '{"event_type": "publish-csharp", "client_payload": {"product": "platform", "sha": "${{ github.sha }}", "sdk_repo": "${{ github.repository }}", "prerelease": "${{ vars.PUBLISH_PRERELEASE }}"}}' + echo "publish-csharp dispatch sent to codat-internal/sdk-codegen for platform @ ${{ github.sha }}${{ vars.PUBLISH_PRERELEASE && format(' as a {0} pre-release', vars.PUBLISH_PRERELEASE) || '' }}" diff --git a/.github/workflows/sync_for_expenses_generate.yaml b/.github/workflows/sync_for_expenses_generate.yaml index 85a355d05..fafe61375 100644 --- a/.github/workflows/sync_for_expenses_generate.yaml +++ b/.github/workflows/sync_for_expenses_generate.yaml @@ -1,3 +1,7 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK +# Codegen generates this SDK and opens a versioned PR here, dispatched by the +# oas pipeline. This stub only says so. name: Generate Sync for Expenses library 'on': workflow_dispatch: @@ -7,18 +11,16 @@ name: Generate Sync for Expenses library type: boolean default: false set_version: - description: optionally set a specific SDK version + description: Optionally set a specific SDK version. type: string jobs: generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - speakeasy_version: latest - set_version: ${{ github.event.inputs.set_version }} - target: sync-for-expenses-library - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} + runs-on: ubuntu-latest + steps: + - name: Generation moved to Codat SDK Codegen + run: | + echo "::warning::This workflow no longer generates anything. sync-for-expenses is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + # Exits 0 because the oas pipeline still runs this workflow on every OAS + # merge; flip to exit 1 in the same change that switches the oas trigger + # to the repository dispatch, so stray runs become loud. + exit 0 diff --git a/.github/workflows/sync_for_expenses_release.yaml b/.github/workflows/sync_for_expenses_release.yaml index f61275f96..68f24ac35 100644 --- a/.github/workflows/sync_for_expenses_release.yaml +++ b/.github/workflows/sync_for_expenses_release.yaml @@ -1,3 +1,15 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Publishing no longer runs in this repo. The packaging checks, the upload to +# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml +# in Codat SDK Codegen - no check has been dropped, they just moved. This stub +# only forwards the release trigger there, authenticated with a short-lived +# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# +# Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the +# next merge publish -rc1 rather than . A plain +# `dotnet add package` takes the newest stable version, so only people who ask +# for the rc by name get it. Clear the variable once the real version has been +# promoted. name: Release Sync for Expenses library 'on': push: @@ -5,11 +17,34 @@ name: Release Sync for Expenses library - sync-for-expenses/RELEASES.md branches: - main + workflow_dispatch: {} +concurrency: publish-sync-for-expenses-csharp jobs: publish: - uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} - nuget_api_key: ${{ secrets.NUGET_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: Check the App secrets are set + env: + APP_ID_SET: ${{ secrets.PUBLISH_TRIGGER_APP_ID != '' }} + APP_KEY_SET: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY != '' }} + run: | + if [ "$APP_ID_SET" != "true" ] || [ "$APP_KEY_SET" != "true" ]; then + echo "::error::PUBLISH_TRIGGER_APP_ID / PUBLISH_TRIGGER_APP_PRIVATE_KEY secrets are not set - needed to mint the token that sends the publish-csharp repository dispatch to codat-internal/sdk-codegen" + exit 1 + fi + - name: Mint a token from the GitHub App + id: app_token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.PUBLISH_TRIGGER_APP_ID }} + private-key: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY }} + owner: codat-internal + repositories: sdk-codegen + - name: Hand the release to the central publish pipeline + run: | + curl --fail-with-body --silent --show-error -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ steps.app_token.outputs.token }}" \ + https://api.github.com/repos/codat-internal/sdk-codegen/dispatches \ + -d '{"event_type": "publish-csharp", "client_payload": {"product": "sync-for-expenses", "sha": "${{ github.sha }}", "sdk_repo": "${{ github.repository }}", "prerelease": "${{ vars.PUBLISH_PRERELEASE }}"}}' + echo "publish-csharp dispatch sent to codat-internal/sdk-codegen for sync-for-expenses @ ${{ github.sha }}${{ vars.PUBLISH_PRERELEASE && format(' as a {0} pre-release', vars.PUBLISH_PRERELEASE) || '' }}" diff --git a/.github/workflows/sync_for_payables_generate.yaml b/.github/workflows/sync_for_payables_generate.yaml index 171e0de10..fb56617ce 100644 --- a/.github/workflows/sync_for_payables_generate.yaml +++ b/.github/workflows/sync_for_payables_generate.yaml @@ -1,3 +1,7 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK +# Codegen generates this SDK and opens a versioned PR here, dispatched by the +# oas pipeline. This stub only says so. name: Generate Sync for Payables library 'on': workflow_dispatch: @@ -7,18 +11,16 @@ name: Generate Sync for Payables library type: boolean default: false set_version: - description: optionally set a specific SDK version + description: Optionally set a specific SDK version. type: string jobs: generate: - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - speakeasy_version: latest - set_version: ${{ github.event.inputs.set_version }} - target: sync-for-payables-library - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} + runs-on: ubuntu-latest + steps: + - name: Generation moved to Codat SDK Codegen + run: | + echo "::warning::This workflow no longer generates anything. sync-for-payables is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + # Exits 0 because the oas pipeline still runs this workflow on every OAS + # merge; flip to exit 1 in the same change that switches the oas trigger + # to the repository dispatch, so stray runs become loud. + exit 0 diff --git a/.github/workflows/sync_for_payables_release.yaml b/.github/workflows/sync_for_payables_release.yaml index c64ac2c3d..dfb139890 100644 --- a/.github/workflows/sync_for_payables_release.yaml +++ b/.github/workflows/sync_for_payables_release.yaml @@ -1,3 +1,15 @@ +# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Publishing no longer runs in this repo. The packaging checks, the upload to +# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml +# in Codat SDK Codegen - no check has been dropped, they just moved. This stub +# only forwards the release trigger there, authenticated with a short-lived +# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# +# Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the +# next merge publish -rc1 rather than . A plain +# `dotnet add package` takes the newest stable version, so only people who ask +# for the rc by name get it. Clear the variable once the real version has been +# promoted. name: Release Sync for Payables library 'on': push: @@ -5,11 +17,34 @@ name: Release Sync for Payables library - sync-for-payables/RELEASES.md branches: - main + workflow_dispatch: {} +concurrency: publish-sync-for-payables-csharp jobs: publish: - uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 - secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} - slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} - nuget_api_key: ${{ secrets.NUGET_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: Check the App secrets are set + env: + APP_ID_SET: ${{ secrets.PUBLISH_TRIGGER_APP_ID != '' }} + APP_KEY_SET: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY != '' }} + run: | + if [ "$APP_ID_SET" != "true" ] || [ "$APP_KEY_SET" != "true" ]; then + echo "::error::PUBLISH_TRIGGER_APP_ID / PUBLISH_TRIGGER_APP_PRIVATE_KEY secrets are not set - needed to mint the token that sends the publish-csharp repository dispatch to codat-internal/sdk-codegen" + exit 1 + fi + - name: Mint a token from the GitHub App + id: app_token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.PUBLISH_TRIGGER_APP_ID }} + private-key: ${{ secrets.PUBLISH_TRIGGER_APP_PRIVATE_KEY }} + owner: codat-internal + repositories: sdk-codegen + - name: Hand the release to the central publish pipeline + run: | + curl --fail-with-body --silent --show-error -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ steps.app_token.outputs.token }}" \ + https://api.github.com/repos/codat-internal/sdk-codegen/dispatches \ + -d '{"event_type": "publish-csharp", "client_payload": {"product": "sync-for-payables", "sha": "${{ github.sha }}", "sdk_repo": "${{ github.repository }}", "prerelease": "${{ vars.PUBLISH_PRERELEASE }}"}}' + echo "publish-csharp dispatch sent to codat-internal/sdk-codegen for sync-for-payables @ ${{ github.sha }}${{ vars.PUBLISH_PRERELEASE && format(' as a {0} pre-release', vars.PUBLISH_PRERELEASE) || '' }}" From faf80e3dc326909d975689e36f93d109894788e7 Mon Sep 17 00:00:00 2001 From: mcollinscodat Date: Tue, 25 Aug 2026 18:56:43 +0100 Subject: [PATCH 2/3] feat/CONN-1664-release-stubs: shorten the release stub comments .github/workflows/{bank_feeds,lending,platform,sync_for_expenses,sync_for_payables}_release.yaml - cut the header comment to where publishing runs and what the PUBLISH_PRERELEASE variable does --- .github/workflows/bank_feeds_release.yaml | 14 +++++--------- .github/workflows/lending_release.yaml | 14 +++++--------- .github/workflows/platform_release.yaml | 14 +++++--------- .github/workflows/sync_for_expenses_release.yaml | 14 +++++--------- .github/workflows/sync_for_payables_release.yaml | 14 +++++--------- 5 files changed, 25 insertions(+), 45 deletions(-) diff --git a/.github/workflows/bank_feeds_release.yaml b/.github/workflows/bank_feeds_release.yaml index 3f6f67faf..a0228c686 100644 --- a/.github/workflows/bank_feeds_release.yaml +++ b/.github/workflows/bank_feeds_release.yaml @@ -1,15 +1,11 @@ # Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Publishing no longer runs in this repo. The packaging checks, the upload to -# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml -# in Codat SDK Codegen - no check has been dropped, they just moved. This stub -# only forwards the release trigger there, authenticated with a short-lived -# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# The upload to NuGet, the packaging checks, the tag and the GitHub release run +# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards +# the release trigger there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the -# next merge publish -rc1 rather than . A plain -# `dotnet add package` takes the newest stable version, so only people who ask -# for the rc by name get it. Clear the variable once the real version has been -# promoted. +# next merge publish -rc1 rather than . Clear it once the +# real version has gone out. name: Release Bank Feeds library 'on': push: diff --git a/.github/workflows/lending_release.yaml b/.github/workflows/lending_release.yaml index 3cbb9fb57..384313641 100644 --- a/.github/workflows/lending_release.yaml +++ b/.github/workflows/lending_release.yaml @@ -1,15 +1,11 @@ # Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Publishing no longer runs in this repo. The packaging checks, the upload to -# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml -# in Codat SDK Codegen - no check has been dropped, they just moved. This stub -# only forwards the release trigger there, authenticated with a short-lived -# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# The upload to NuGet, the packaging checks, the tag and the GitHub release run +# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards +# the release trigger there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the -# next merge publish -rc1 rather than . A plain -# `dotnet add package` takes the newest stable version, so only people who ask -# for the rc by name get it. Clear the variable once the real version has been -# promoted. +# next merge publish -rc1 rather than . Clear it once the +# real version has gone out. name: Release Lending library 'on': push: diff --git a/.github/workflows/platform_release.yaml b/.github/workflows/platform_release.yaml index 6702707a3..60be53237 100644 --- a/.github/workflows/platform_release.yaml +++ b/.github/workflows/platform_release.yaml @@ -1,15 +1,11 @@ # Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Publishing no longer runs in this repo. The packaging checks, the upload to -# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml -# in Codat SDK Codegen - no check has been dropped, they just moved. This stub -# only forwards the release trigger there, authenticated with a short-lived -# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# The upload to NuGet, the packaging checks, the tag and the GitHub release run +# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards +# the release trigger there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the -# next merge publish -rc1 rather than . A plain -# `dotnet add package` takes the newest stable version, so only people who ask -# for the rc by name get it. Clear the variable once the real version has been -# promoted. +# next merge publish -rc1 rather than . Clear it once the +# real version has gone out. name: Release Platform library 'on': push: diff --git a/.github/workflows/sync_for_expenses_release.yaml b/.github/workflows/sync_for_expenses_release.yaml index 68f24ac35..66921120c 100644 --- a/.github/workflows/sync_for_expenses_release.yaml +++ b/.github/workflows/sync_for_expenses_release.yaml @@ -1,15 +1,11 @@ # Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Publishing no longer runs in this repo. The packaging checks, the upload to -# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml -# in Codat SDK Codegen - no check has been dropped, they just moved. This stub -# only forwards the release trigger there, authenticated with a short-lived -# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# The upload to NuGet, the packaging checks, the tag and the GitHub release run +# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards +# the release trigger there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the -# next merge publish -rc1 rather than . A plain -# `dotnet add package` takes the newest stable version, so only people who ask -# for the rc by name get it. Clear the variable once the real version has been -# promoted. +# next merge publish -rc1 rather than . Clear it once the +# real version has gone out. name: Release Sync for Expenses library 'on': push: diff --git a/.github/workflows/sync_for_payables_release.yaml b/.github/workflows/sync_for_payables_release.yaml index dfb139890..e20d6b622 100644 --- a/.github/workflows/sync_for_payables_release.yaml +++ b/.github/workflows/sync_for_payables_release.yaml @@ -1,15 +1,11 @@ # Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Publishing no longer runs in this repo. The packaging checks, the upload to -# NuGet, the tag and the GitHub release all run centrally in publish-csharp.yml -# in Codat SDK Codegen - no check has been dropped, they just moved. This stub -# only forwards the release trigger there, authenticated with a short-lived -# token minted from the GitHub App in the PUBLISH_TRIGGER_APP_* secrets. +# The upload to NuGet, the packaging checks, the tag and the GitHub release run +# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards +# the release trigger there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the -# next merge publish -rc1 rather than . A plain -# `dotnet add package` takes the newest stable version, so only people who ask -# for the rc by name get it. Clear the variable once the real version has been -# promoted. +# next merge publish -rc1 rather than . Clear it once the +# real version has gone out. name: Release Sync for Payables library 'on': push: From b81f31ddff8f6acbc6abe4b0734419344757384f Mon Sep 17 00:00:00 2001 From: mcollinscodat Date: Wed, 26 Aug 2026 09:17:51 +0100 Subject: [PATCH 3/3] feat/CONN-1664-release-stubs: drop internal filenames from the workflow comments .github/workflows/*_generate.yaml - say Codat SDK Codegen generates this SDK, without naming its workflow file .github/workflows/*_release.yaml - same for the release comment, and drop the generator script name from the "written by" line --- .github/workflows/bank_feeds_generate.yaml | 10 +++++----- .github/workflows/bank_feeds_release.yaml | 6 +++--- .github/workflows/lending_generate.yaml | 10 +++++----- .github/workflows/lending_release.yaml | 6 +++--- .github/workflows/platform_generate.yaml | 10 +++++----- .github/workflows/platform_release.yaml | 6 +++--- .github/workflows/sync_for_expenses_generate.yaml | 10 +++++----- .github/workflows/sync_for_expenses_release.yaml | 6 +++--- .github/workflows/sync_for_payables_generate.yaml | 10 +++++----- .github/workflows/sync_for_payables_release.yaml | 6 +++--- 10 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/bank_feeds_generate.yaml b/.github/workflows/bank_feeds_generate.yaml index 2fd103af1..348b686a3 100644 --- a/.github/workflows/bank_feeds_generate.yaml +++ b/.github/workflows/bank_feeds_generate.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK -# Codegen generates this SDK and opens a versioned PR here, dispatched by the -# oas pipeline. This stub only says so. +# Written by sdk-codegen; do not edit by hand. +# Generation no longer runs in this repo: Codat SDK Codegen generates this SDK +# and opens a versioned PR here, dispatched by the oas pipeline. This stub only +# says so. name: Generate Bank Feeds library 'on': workflow_dispatch: @@ -19,7 +19,7 @@ jobs: steps: - name: Generation moved to Codat SDK Codegen run: | - echo "::warning::This workflow no longer generates anything. bank-feeds is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + echo "::warning::This workflow no longer generates anything. bank-feeds is generated by Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." # Exits 0 because the oas pipeline still runs this workflow on every OAS # merge; flip to exit 1 in the same change that switches the oas trigger # to the repository dispatch, so stray runs become loud. diff --git a/.github/workflows/bank_feeds_release.yaml b/.github/workflows/bank_feeds_release.yaml index a0228c686..e44aacce3 100644 --- a/.github/workflows/bank_feeds_release.yaml +++ b/.github/workflows/bank_feeds_release.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Written by sdk-codegen; do not edit by hand. # The upload to NuGet, the packaging checks, the tag and the GitHub release run -# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards -# the release trigger there. +# centrally in Codat SDK Codegen. This stub only forwards the release trigger +# there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the # next merge publish -rc1 rather than . Clear it once the diff --git a/.github/workflows/lending_generate.yaml b/.github/workflows/lending_generate.yaml index 93bcaab3b..65758b800 100644 --- a/.github/workflows/lending_generate.yaml +++ b/.github/workflows/lending_generate.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK -# Codegen generates this SDK and opens a versioned PR here, dispatched by the -# oas pipeline. This stub only says so. +# Written by sdk-codegen; do not edit by hand. +# Generation no longer runs in this repo: Codat SDK Codegen generates this SDK +# and opens a versioned PR here, dispatched by the oas pipeline. This stub only +# says so. name: Generate Lending library 'on': workflow_dispatch: @@ -19,7 +19,7 @@ jobs: steps: - name: Generation moved to Codat SDK Codegen run: | - echo "::warning::This workflow no longer generates anything. lending is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + echo "::warning::This workflow no longer generates anything. lending is generated by Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." # Exits 0 because the oas pipeline still runs this workflow on every OAS # merge; flip to exit 1 in the same change that switches the oas trigger # to the repository dispatch, so stray runs become loud. diff --git a/.github/workflows/lending_release.yaml b/.github/workflows/lending_release.yaml index 384313641..d91ae7869 100644 --- a/.github/workflows/lending_release.yaml +++ b/.github/workflows/lending_release.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Written by sdk-codegen; do not edit by hand. # The upload to NuGet, the packaging checks, the tag and the GitHub release run -# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards -# the release trigger there. +# centrally in Codat SDK Codegen. This stub only forwards the release trigger +# there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the # next merge publish -rc1 rather than . Clear it once the diff --git a/.github/workflows/platform_generate.yaml b/.github/workflows/platform_generate.yaml index a0dc2273e..1dbd05188 100644 --- a/.github/workflows/platform_generate.yaml +++ b/.github/workflows/platform_generate.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK -# Codegen generates this SDK and opens a versioned PR here, dispatched by the -# oas pipeline. This stub only says so. +# Written by sdk-codegen; do not edit by hand. +# Generation no longer runs in this repo: Codat SDK Codegen generates this SDK +# and opens a versioned PR here, dispatched by the oas pipeline. This stub only +# says so. name: Generate Platform library 'on': workflow_dispatch: @@ -19,7 +19,7 @@ jobs: steps: - name: Generation moved to Codat SDK Codegen run: | - echo "::warning::This workflow no longer generates anything. platform is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + echo "::warning::This workflow no longer generates anything. platform is generated by Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." # Exits 0 because the oas pipeline still runs this workflow on every OAS # merge; flip to exit 1 in the same change that switches the oas trigger # to the repository dispatch, so stray runs become loud. diff --git a/.github/workflows/platform_release.yaml b/.github/workflows/platform_release.yaml index 60be53237..537ff70dd 100644 --- a/.github/workflows/platform_release.yaml +++ b/.github/workflows/platform_release.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Written by sdk-codegen; do not edit by hand. # The upload to NuGet, the packaging checks, the tag and the GitHub release run -# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards -# the release trigger there. +# centrally in Codat SDK Codegen. This stub only forwards the release trigger +# there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the # next merge publish -rc1 rather than . Clear it once the diff --git a/.github/workflows/sync_for_expenses_generate.yaml b/.github/workflows/sync_for_expenses_generate.yaml index fafe61375..85392ed5b 100644 --- a/.github/workflows/sync_for_expenses_generate.yaml +++ b/.github/workflows/sync_for_expenses_generate.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK -# Codegen generates this SDK and opens a versioned PR here, dispatched by the -# oas pipeline. This stub only says so. +# Written by sdk-codegen; do not edit by hand. +# Generation no longer runs in this repo: Codat SDK Codegen generates this SDK +# and opens a versioned PR here, dispatched by the oas pipeline. This stub only +# says so. name: Generate Sync for Expenses library 'on': workflow_dispatch: @@ -19,7 +19,7 @@ jobs: steps: - name: Generation moved to Codat SDK Codegen run: | - echo "::warning::This workflow no longer generates anything. sync-for-expenses is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + echo "::warning::This workflow no longer generates anything. sync-for-expenses is generated by Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." # Exits 0 because the oas pipeline still runs this workflow on every OAS # merge; flip to exit 1 in the same change that switches the oas trigger # to the repository dispatch, so stray runs become loud. diff --git a/.github/workflows/sync_for_expenses_release.yaml b/.github/workflows/sync_for_expenses_release.yaml index 66921120c..ee7e3f933 100644 --- a/.github/workflows/sync_for_expenses_release.yaml +++ b/.github/workflows/sync_for_expenses_release.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Written by sdk-codegen; do not edit by hand. # The upload to NuGet, the packaging checks, the tag and the GitHub release run -# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards -# the release trigger there. +# centrally in Codat SDK Codegen. This stub only forwards the release trigger +# there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the # next merge publish -rc1 rather than . Clear it once the diff --git a/.github/workflows/sync_for_payables_generate.yaml b/.github/workflows/sync_for_payables_generate.yaml index fb56617ce..d6b70eab3 100644 --- a/.github/workflows/sync_for_payables_generate.yaml +++ b/.github/workflows/sync_for_payables_generate.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. -# Generation no longer runs in this repo: generate-and-pr.yml in Codat SDK -# Codegen generates this SDK and opens a versioned PR here, dispatched by the -# oas pipeline. This stub only says so. +# Written by sdk-codegen; do not edit by hand. +# Generation no longer runs in this repo: Codat SDK Codegen generates this SDK +# and opens a versioned PR here, dispatched by the oas pipeline. This stub only +# says so. name: Generate Sync for Payables library 'on': workflow_dispatch: @@ -19,7 +19,7 @@ jobs: steps: - name: Generation moved to Codat SDK Codegen run: | - echo "::warning::This workflow no longer generates anything. sync-for-payables is generated by generate-and-pr.yml in Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." + echo "::warning::This workflow no longer generates anything. sync-for-payables is generated by Codat SDK Codegen, dispatched by the oas pipeline, which opens a versioned PR on this repo." # Exits 0 because the oas pipeline still runs this workflow on every OAS # merge; flip to exit 1 in the same change that switches the oas trigger # to the repository dispatch, so stray runs become loud. diff --git a/.github/workflows/sync_for_payables_release.yaml b/.github/workflows/sync_for_payables_release.yaml index e20d6b622..11bafacc9 100644 --- a/.github/workflows/sync_for_payables_release.yaml +++ b/.github/workflows/sync_for_payables_release.yaml @@ -1,7 +1,7 @@ -# Written by sdk-codegen (emit_workflow_stubs.py); do not edit by hand. +# Written by sdk-codegen; do not edit by hand. # The upload to NuGet, the packaging checks, the tag and the GitHub release run -# centrally in publish-csharp.yml in Codat SDK Codegen. This stub only forwards -# the release trigger there. +# centrally in Codat SDK Codegen. This stub only forwards the release trigger +# there. # # Set the PUBLISH_PRERELEASE Actions variable on this repo to rc1 to make the # next merge publish -rc1 rather than . Clear it once the