Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 03:37 UTC
| 1 | name: Update CLI Changelog |
| 2 | |
| 3 | on: |
| 4 | # The job uses only protected next code and published tag contents as data. |
| 5 | # It does not download artifacts or use caches from the triggering workflow. |
| 6 | workflow_run: # zizmor: ignore[dangerous-triggers] |
| 7 | workflows: [Build CLI Binaries] |
| 8 | types: [completed] |
| 9 | workflow_dispatch: |
| 10 | |
| 11 | permissions: |
| 12 | contents: read |
| 13 | |
| 14 | concurrency: |
| 15 | group: cli-changelog |
| 16 | cancel-in-progress: false |
| 17 | |
| 18 | jobs: |
| 19 | changelog: |
| 20 | # This runs on the protected default branch with the SDK release App's |
| 21 | # environment. Read published tags as data and execute only code from next. |
| 22 | if: >- |
| 23 | github.repository == 'ComposioHQ/composio' && github.ref == 'refs/heads/next' && |
| 24 | (github.event_name == 'workflow_dispatch' || |
| 25 | (github.event.workflow_run.conclusion == 'success' && |
| 26 | github.event.workflow_run.event == 'workflow_dispatch' && |
| 27 | github.event.workflow_run.head_repository.full_name == github.repository && |
| 28 | startsWith(github.event.workflow_run.head_branch, '@composio/cli@'))) |
| 29 | runs-on: ubuntu-latest |
| 30 | timeout-minutes: 10 |
| 31 | environment: sdk-release-control |
| 32 | steps: |
| 33 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 34 | with: |
| 35 | ref: next |
| 36 | fetch-depth: 0 |
| 37 | persist-credentials: false |
| 38 | - uses: ./.github/actions/setup-node-pnpm-bun |
| 39 | with: |
| 40 | enable-caching: 'false' |
| 41 | - run: bun test ./.github/scripts/cli-release/update-changelog.test.ts |
| 42 | - name: Update the changelog from published stable tags |
| 43 | env: |
| 44 | GH_TOKEN: ${{ github.token }} |
| 45 | run: | |
| 46 | published=$(gh release list --exclude-drafts --exclude-pre-releases --limit 1000 --json tagName --jq '.[].tagName') |
| 47 | mapfile -t tags <<< "$published" |
| 48 | bun .github/scripts/cli-release/update-changelog.ts "${tags[@]}" |
| 49 | - uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 |
| 50 | id: app |
| 51 | with: |
| 52 | client-id: ${{ vars.SDK_RELEASE_APP_CLIENT_ID }} |
| 53 | private-key: ${{ secrets.SDK_RELEASE_APP_PRIVATE_KEY }} |
| 54 | owner: ComposioHQ |
| 55 | repositories: composio |
| 56 | permission-contents: write |
| 57 | permission-pull-requests: write |
| 58 | - name: Create or update the changelog PR |
| 59 | uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3 |
| 60 | with: |
| 61 | token: ${{ steps.app.outputs.token }} |
| 62 | base: next |
| 63 | branch: chore/cli-release-changelog |
| 64 | delete-branch: true |
| 65 | commit-message: 'docs(cli): update the stable changelog' |
| 66 | title: 'docs(cli): update the stable changelog' |
| 67 | body: | |
| 68 | Move the notes included in published stable binaries into their version sections. |
| 69 | Notes added after those releases stay under Unreleased. |
| 70 | |
| 71 | [Changelog workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
| 72 | add-paths: ts/packages/cli/CHANGELOG.md |