Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
Fix release-triggered CLI/Python workflow flow (#2759)
Musthaq Ahamad25a3898c8eca
diff --git a/.changeset/slick-wolves-heal.md b/.changeset/slick-wolves-heal.mdnew file mode 100644index 000000000..39d8ad030--- /dev/null+++ b/.changeset/slick-wolves-heal.md@@ -0,0 +1,5 @@+---+'@composio/cli': patch+---++Fix test installationdiff --git a/.github/workflows/build-cli-binaries.yml b/.github/workflows/build-cli-binaries.ymlindex 504bbd1a8..4ad7dee66 100644--- a/.github/workflows/build-cli-binaries.yml+++ b/.github/workflows/build-cli-binaries.yml@@ -1,11 +1,8 @@name: Build CLI Binarieson:- push:- tags:- # Temporary compatibility window: support both legacy v* and package-scoped CLI tags.- - 'v*'- - '@composio/cli@*'+ release:+ types: [published]workflow_dispatch:inputs:version:@@ -18,6 +15,7 @@ permissions:jobs:build-binaries:name: Build CLI Binaries+ if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, '@composio/cli@') || startsWith(github.event.release.tag_name, 'v')runs-on: ${{ matrix.runner }}strategy:matrix:@@ -105,15 +103,15 @@ jobs:retention-days: 7- name: Create Release- if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'+ if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'uses: softprops/action-gh-release@v2with:- tag_name: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.ref_name }}- name: ${{ github.event_name == 'workflow_dispatch' && format('CLI @composio/cli@{0} (Manual Build)', inputs.version) || github.ref_name }}+ tag_name: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}+ name: ${{ github.event_name == 'workflow_dispatch' && format('CLI @composio/cli@{0} (Manual Build)', inputs.version) || github.event.release.tag_name }}files: |ts/packages/cli/dist/binaries/${{ matrix.artifact }}.zipdraft: false- prerelease: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}+ prerelease: ${{ github.event_name == 'workflow_dispatch' || github.event.release.prerelease || contains(github.event.release.tag_name, 'alpha') || contains(github.event.release.tag_name, 'beta') || contains(github.event.release.tag_name, 'rc') }}generate_release_notes: truemake_latest: ${{ github.event_name != 'workflow_dispatch' }}env:@@ -122,16 +120,16 @@ jobs:test-installation:name: Test Installationneeds: build-binaries- if: always() && !cancelled() && (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')+ if: always() && !cancelled() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')uses: ./.github/workflows/cli.test-installation.ymlwith:- version: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.ref_name }}+ version: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}create-install-instructions:name: Create Install Instructionsneeds: build-binariesruns-on: ubuntu-latest- if: always() && !cancelled() && (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')+ if: always() && !cancelled() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')steps:- name: Checkout@@ -139,7 +137,7 @@ jobs:- name: Create installation READMErun: |- RELEASE_TAG="${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.ref_name }}"+ RELEASE_TAG="${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}"cat > INSTALL.md << 'EOF'# Composio CLI Installationdiff --git a/.github/workflows/cli.test-installation.yml b/.github/workflows/cli.test-installation.ymlindex 415f829b7..10422afed 100644--- a/.github/workflows/cli.test-installation.yml+++ b/.github/workflows/cli.test-installation.yml@@ -9,7 +9,7 @@ on:workflow_dispatch:inputs:version:- description: 'Semver version to test (e.g., 1.0.0)'+ description: 'Version to test (e.g., 1.0.0 or @composio/[email protected])'required: trueworkflow_call:inputs:@@ -81,16 +81,20 @@ jobs:exit 0fi- # For manual runs, require semver input and build the release tag.+ # For manual runs, accept a full package tag or semver and normalize to a package tag.if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then- if [[ ! "$raw_input" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then- echo "Invalid semver version: '$raw_input'"- echo "Expected format like: 1.2.3, 1.2.3-beta.1, 1.2.3+build.7"- exit 1+ if [[ "$raw_input" =~ ^@composio/cli@ ]]; then+ echo "use_latest=false" >> "$GITHUB_OUTPUT"+ echo "release_tag=$raw_input" >> "$GITHUB_OUTPUT"+ exit 0+ elif [[ "$raw_input" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then+ echo "use_latest=false" >> "$GITHUB_OUTPUT"+ echo "release_tag=@composio/cli@$raw_input" >> "$GITHUB_OUTPUT"+ exit 0fi- echo "use_latest=false" >> "$GITHUB_OUTPUT"- echo "release_tag=@composio/cli@$raw_input" >> "$GITHUB_OUTPUT"- exit 0+ echo "Invalid version: '$raw_input'"+ echo "Expected format like: 1.2.3, 1.2.3-beta.1, 1.2.3+build.7, or @composio/[email protected]"+ exit 1fi# For workflow_call / push, accept a full package tag, semver, or legacy v* tag.@@ -103,6 +107,7 @@ jobs:elseecho "use_latest=false" >> "$GITHUB_OUTPUT"echo "release_tag=$raw_input" >> "$GITHUB_OUTPUT"+ exit 0fi- name: Setup shell environmentdiff --git a/.github/workflows/py.release.yml b/.github/workflows/py.release.ymlindex 6cee066b3..22fa186ee 100644--- a/.github/workflows/py.release.yml+++ b/.github/workflows/py.release.yml@@ -13,6 +13,7 @@ on:jobs:publish-core:name: Build and release SDK+ if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'py-v')defaults:run:working-directory: ./python