Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
yml 103 lines 3.32 KB
Raw
1 name: CLI Windows x64
2
3 on:
4 pull_request:
5 paths:
6 - 'ts/packages/cli/**'
7 - 'ts/packages/cli-keyring/**'
8 - 'ts/packages/core/**'
9 - 'ts/packages/ts-builders/**'
10 - 'ts/packages/json-schema-to-effect-schema/**'
11 - '.github/actions/setup-node-pnpm-bun/action.yml'
12 - '.github/scripts/cli-release/**'
13 - '.github/workflows/cli.windows.yml'
14 - '.github/workflows/build-cli-binaries.yml'
15 - 'install.ps1'
16 - 'package.json'
17 - 'pnpm-lock.yaml'
18 - 'pnpm-workspace.yaml'
19 - 'mise.toml'
20 - 'mise.lock'
21 workflow_call:
22 inputs:
23 release_tag:
24 description: 'Exact CLI release tag to embed and verify'
25 type: string
26 required: false
27 default: '@composio/cli@0.0.0-beta.0'
28
29 permissions:
30 contents: read
31
32 env:
33 RELEASE_TAG: ${{ inputs.release_tag || '@composio/cli@0.0.0-beta.0' }}
34 TURBO_TELEMETRY_DEBUG: 1
35
36 jobs:
37 build:
38 name: Build Windows archive
39 runs-on: ubuntu-latest
40 steps:
41 - name: Checkout
42 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43 with:
44 ref: ${{ github.sha }}
45
46 - name: Setup Node.js, pnpm, Bun
47 uses: ./.github/actions/setup-node-pnpm-bun
48 with:
49 cache-save: ${{ github.event_name != 'pull_request' && 'true' || 'false' }}
50
51 - name: Install dependencies
52 run: pnpm install --frozen-lockfile --ignore-scripts
53
54 - name: Build packages
55 run: pnpm build:packages
56
57 - name: Cross-compile Windows x64
58 working-directory: ts/packages/cli
59 env:
60 COMPOSIO_POSTHOG_PROJECT_API_KEY: ${{ vars.COMPOSIO_POSTHOG_PROJECT_API_KEY }}
61 run: pnpm build:binary:cross --target bun-windows-x64
62
63 - name: Package Windows archive
64 working-directory: ts/packages/cli
65 run: pnpm build:binary:package
66
67 - name: Verify release metadata and companion layout
68 env:
69 ARCHIVE: ts/packages/cli/dist/binaries/composio-windows-x64.zip
70 ARTIFACT: composio-windows-x64
71 run: |
72 unzip -p "$ARCHIVE" "$ARTIFACT/release-tag.txt" | grep -Fx "$RELEASE_TAG"
73 bash .github/scripts/cli-release/verify-archive-companions.sh
74
75 - name: Upload Windows archive
76 uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
77 with:
78 name: composio-windows-x64
79 path: ts/packages/cli/dist/binaries/composio-windows-x64.zip
80 retention-days: 7
81
82 test:
83 name: Native Windows installation and runtime
84 needs: build
85 # Standard GitHub-hosted Windows runners are free for public repositories.
86 runs-on: windows-2025
87 steps:
88 - name: Checkout
89 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
90 with:
91 ref: ${{ github.sha }}
92
93 - name: Download Windows archive
94 uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
95 with:
96 name: composio-windows-x64
97 path: windows-artifact
98
99 - name: Test installer, native binary, companions, and upgrades
100 shell: pwsh
101 run: |
102 $expectedVersion = $env:RELEASE_TAG -replace '^@composio/cli@', ''
103 ./.github/scripts/cli-release/test-windows.ps1 -ArchivePath ./windows-artifact/composio-windows-x64.zip -ExpectedVersion $expectedVersion