name: Release on: workflow_dispatch: inputs: increment: description: 'Version bump: patch, minor, major, or explicit (e.g. 1.27.0)' required: true default: 'patch' type: string release_name: description: 'Custom release name (optional, defaults to "CloudCLI UI vX.Y.Z")' required: false type: string jobs: build-macos-semantic-helper: strategy: fail-fast: false matrix: include: - runs_on: macos-15 target_dir: darwin-arm64 - runs_on: macos-15-intel target_dir: darwin-x64 runs-on: ${{ matrix.runs_on }} steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: node-version: 22 - name: Build macOS semantic helper run: node scripts/build-computer-semantics.mjs env: CLOUDCLI_SEMANTICS_BUILD_REQUIRED: "1" - name: Verify macOS semantic helper target run: test -x "server/modules/computer-use/semantics/bin/${{ matrix.target_dir }}/CloudCLISemantics" - name: Stage macOS semantic helper artifact run: | mkdir -p "semantic-helper-artifact/${{ matrix.target_dir }}" cp "server/modules/computer-use/semantics/bin/${{ matrix.target_dir }}/CloudCLISemantics" "semantic-helper-artifact/${{ matrix.target_dir }}/" - uses: actions/upload-artifact@v6 with: name: semantic-helper-${{ matrix.target_dir }} path: semantic-helper-artifact/* if-no-files-found: error build-windows-semantic-helper: strategy: fail-fast: false matrix: include: - runs_on: windows-2025 target_dir: win32-x64 - runs_on: windows-11-arm target_dir: win32-arm64 runs-on: ${{ matrix.runs_on }} steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: node-version: 22 - name: Build Windows semantic helper run: node scripts/build-computer-semantics.mjs env: CLOUDCLI_SEMANTICS_BUILD_REQUIRED: "1" - name: Verify Windows semantic helper target shell: bash run: test -f "server/modules/computer-use/semantics/bin/${{ matrix.target_dir }}/CloudCLISemantics.exe" - name: Stage Windows semantic helper artifact shell: bash run: | mkdir -p "semantic-helper-artifact/${{ matrix.target_dir }}" cp "server/modules/computer-use/semantics/bin/${{ matrix.target_dir }}/CloudCLISemantics.exe" "semantic-helper-artifact/${{ matrix.target_dir }}/" - uses: actions/upload-artifact@v6 with: name: semantic-helper-${{ matrix.target_dir }} path: semantic-helper-artifact/* if-no-files-found: error release: needs: - build-macos-semantic-helper - build-windows-semantic-helper runs-on: ubuntu-latest permissions: contents: write id-token: write steps: - uses: actions/checkout@v6 with: fetch-depth: 0 token: ${{ secrets.RELEASE_PAT }} - uses: actions/setup-node@v6 with: node-version: 22 registry-url: https://registry.npmjs.org - name: git config run: | git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - run: npm ci - uses: actions/download-artifact@v6 with: pattern: semantic-helper-* path: server/modules/computer-use/semantics/bin merge-multiple: true - name: Verify bundled semantic helpers run: | test -x server/modules/computer-use/semantics/bin/darwin-arm64/CloudCLISemantics test -x server/modules/computer-use/semantics/bin/darwin-x64/CloudCLISemantics test -f server/modules/computer-use/semantics/bin/win32-x64/CloudCLISemantics.exe test -f server/modules/computer-use/semantics/bin/win32-arm64/CloudCLISemantics.exe find server/modules/computer-use/semantics/bin -maxdepth 2 -type f -print - name: Release run: | ARGS="--ci --increment=${{ inputs.increment }}" if [ -n "${{ inputs.release_name }}" ]; then ARGS="$ARGS --github.releaseName=\"${{ inputs.release_name }}\"" fi npx release-it $ARGS env: GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}