Release Bank Feeds library #26
This file contains hidden or 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
| # Written by sdk-codegen (cutover/emit_workflow_stubs.py); do not edit by hand. | |
| # Publishing no longer runs in this repo. The packaging checks, the PyPI upload, | |
| # the tag and the GitHub release all run centrally in publish-python.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. | |
| name: Release Bank Feeds library | |
| 'on': | |
| push: | |
| paths: | |
| - bank-feeds/RELEASES.md | |
| branches: | |
| - main | |
| workflow_dispatch: {} | |
| concurrency: publish-bank-feeds-python | |
| jobs: | |
| publish: | |
| 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-python 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-python", "client_payload": {"product": "bank-feeds", "sha": "${{ github.sha }}"}}' | |
| echo "publish-python dispatch sent to codat-internal/sdk-codegen for bank-feeds @ ${{ github.sha }}" |