Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Fix release-triggered CLI/Python workflow flow (#2759)
Musthaq Ahamad committed
Feb 25, 2026 at 17:24 UTC
25a3898c8eca201b9ce427957d9026ae561572ed
4 files changed
+31
-22
.changeset/slick-wolves-heal.md
new
+5
@@ -0,0 +1,5 @@
1
+---
2
+'@composio/cli': patch
3
+---
4
+
5
+Fix test installation
.github/workflows/build-cli-binaries.yml
+11
-13
@@ -1,11 +1,8 @@
1
name: Build CLI Binaries
2
3
on:
4
- push:
5
- tags:
6
- # Temporary compatibility window: support both legacy v* and package-scoped CLI tags.
7
- - 'v*'
8
- - '@composio/cli@*'
4
+ release:
5
+ types: [published]
6
workflow_dispatch:
7
inputs:
8
version:
@@ -18,6 +15,7 @@ permissions:
15
jobs:
16
build-binaries:
17
name: Build CLI Binaries
18
+ if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, '@composio/cli@') || startsWith(github.event.release.tag_name, 'v')
19
runs-on: ${{ matrix.runner }}
20
strategy:
21
matrix:
@@ -105,15 +103,15 @@ jobs:
103
retention-days: 7
104
105
- name: Create Release
108
- if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
106
+ if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
107
uses: softprops/action-gh-release@v2
108
with:
111
- tag_name: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.ref_name }}
112
- name: ${{ github.event_name == 'workflow_dispatch' && format('CLI @composio/cli@{0} (Manual Build)', inputs.version) || github.ref_name }}
109
+ tag_name: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}
110
+ name: ${{ github.event_name == 'workflow_dispatch' && format('CLI @composio/cli@{0} (Manual Build)', inputs.version) || github.event.release.tag_name }}
111
files: |
112
ts/packages/cli/dist/binaries/${{ matrix.artifact }}.zip
113
draft: false
116
- prerelease: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
114
+ 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') }}
115
generate_release_notes: true
116
make_latest: ${{ github.event_name != 'workflow_dispatch' }}
117
env:
@@ -122,16 +120,16 @@ jobs:
120
test-installation:
121
name: Test Installation
122
needs: build-binaries
125
- if: always() && !cancelled() && (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')
123
+ if: always() && !cancelled() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
124
uses: ./.github/workflows/cli.test-installation.yml
125
with:
128
- version: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.ref_name }}
126
+ version: ${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}
127
128
create-install-instructions:
129
name: Create Install Instructions
130
needs: build-binaries
131
runs-on: ubuntu-latest
134
- if: always() && !cancelled() && (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')
132
+ if: always() && !cancelled() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
133
134
steps:
135
- name: Checkout
@@ -139,7 +137,7 @@ jobs:
137
138
- name: Create installation README
139
run: |
142
- RELEASE_TAG="${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.ref_name }}"
140
+ RELEASE_TAG="${{ github.event_name == 'workflow_dispatch' && format('@composio/cli@{0}', inputs.version) || github.event.release.tag_name }}"
141
cat > INSTALL.md << 'EOF'
142
# Composio CLI Installation
143
.github/workflows/cli.test-installation.yml
+14
-9
@@ -9,7 +9,7 @@ on:
9
workflow_dispatch:
10
inputs:
11
version:
12
- description: 'Semver version to test (e.g., 1.0.0)'
12
+ description: 'Version to test (e.g., 1.0.0 or @composio/cli@1.0.0)'
13
required: true
14
workflow_call:
15
inputs:
@@ -81,16 +81,20 @@ jobs:
81
exit 0
82
fi
83
84
- # For manual runs, require semver input and build the release tag.
84
+ # For manual runs, accept a full package tag or semver and normalize to a package tag.
85
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
86
- if [[ ! "$raw_input" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
87
- echo "Invalid semver version: '$raw_input'"
88
- echo "Expected format like: 1.2.3, 1.2.3-beta.1, 1.2.3+build.7"
89
- exit 1
86
+ if [[ "$raw_input" =~ ^@composio/cli@ ]]; then
87
+ echo "use_latest=false" >> "$GITHUB_OUTPUT"
88
+ echo "release_tag=$raw_input" >> "$GITHUB_OUTPUT"
89
+ exit 0
90
+ elif [[ "$raw_input" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
91
+ echo "use_latest=false" >> "$GITHUB_OUTPUT"
92
+ echo "release_tag=@composio/cli@$raw_input" >> "$GITHUB_OUTPUT"
93
+ exit 0
94
fi
91
- echo "use_latest=false" >> "$GITHUB_OUTPUT"
92
- echo "release_tag=@composio/cli@$raw_input" >> "$GITHUB_OUTPUT"
93
- exit 0
95
+ echo "Invalid version: '$raw_input'"
96
+ echo "Expected format like: 1.2.3, 1.2.3-beta.1, 1.2.3+build.7, or @composio/cli@1.2.3"
97
+ exit 1
98
fi
99
100
# For workflow_call / push, accept a full package tag, semver, or legacy v* tag.
@@ -103,6 +107,7 @@ jobs:
107
else
108
echo "use_latest=false" >> "$GITHUB_OUTPUT"
109
echo "release_tag=$raw_input" >> "$GITHUB_OUTPUT"
110
+ exit 0
111
fi
112
113
- name: Setup shell environment
.github/workflows/py.release.yml
+1
@@ -13,6 +13,7 @@ on:
13
jobs:
14
publish-core:
15
name: Build and release SDK
16
+ if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'py-v')
17
defaults:
18
run:
19
working-directory: ./python