Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7a1df24
Added github action
diego-ferrand Oct 22, 2025
f5f4a74
Fixed build.py typo
diego-ferrand Oct 22, 2025
8d8fb3f
Set branch to deploy
diego-ferrand Oct 22, 2025
01caa83
Set branch to deploy
diego-ferrand Oct 22, 2025
90d324d
Remove public runner
diego-ferrand Oct 22, 2025
6f7b9fb
Added branch to artifact deploy
diego-ferrand Oct 22, 2025
38a3c82
Remove dist from git ignore
diego-ferrand Oct 22, 2025
5f98c6a
[skip ci] Update all binary artifacts
actions-user Oct 22, 2025
dec1dc9
add docker build
diego-ferrand Oct 23, 2025
d2635ab
Merge branch 'GITHUB_ACTIONS' of https://github.com/PerfectoCode/perf…
diego-ferrand Oct 23, 2025
03753a6
[skip ci] Update all binary artifacts
actions-user Oct 23, 2025
1898261
Add branch deploy
diego-ferrand Oct 23, 2025
28bb0c8
Merge branch 'GITHUB_ACTIONS' of https://github.com/PerfectoCode/perf…
diego-ferrand Oct 23, 2025
40c53e5
[skip ci] Update all binary artifacts
actions-user Oct 23, 2025
d6e3bea
Removed push trigger
diego-ferrand Oct 24, 2025
99b56b5
[skip ci] Update all binary artifacts
actions-user Oct 24, 2025
9bd8b11
Removed another push condition
diego-ferrand Oct 24, 2025
f894762
Merge branch 'GITHUB_ACTIONS' of https://github.com/PerfectoCode/perf…
diego-ferrand Oct 24, 2025
5e08688
[skip ci] Update all binary artifacts
actions-user Oct 24, 2025
8c66b62
Merge branch 'main' of https://github.com/PerfectoCode/perfecto-mcp i…
diego-ferrand Oct 24, 2025
262db89
Fix workflow filename: build.yaml -> build.yml
diego-ferrand Oct 24, 2025
b47552c
Merge branch 'GITHUB_ACTIONS' of https://github.com/PerfectoCode/perf…
diego-ferrand Oct 24, 2025
8977aa9
[skip ci] Update all binary artifacts
actions-user Oct 24, 2025
698e027
Merge branch 'main' of https://github.com/PerfectoCode/perfecto-mcp i…
diego-ferrand Oct 24, 2025
e6b3209
Merge branch 'GITHUB_ACTIONS' of https://github.com/PerfectoCode/perf…
diego-ferrand Oct 24, 2025
fd5b6ed
Remove branch from pipeline
diego-ferrand Oct 24, 2025
308e5a5
Merge branch 'main' of https://github.com/PerfectoCode/perfecto-mcp i…
diego-ferrand Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Build Binaries

on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
name: linux
arch: amd64
- os: windows-latest
name: windows
arch: amd64
- os: macos-latest
name: macos
arch: arm64
- os: macos-15-intel
name: macos
arch: amd64

steps:
- uses: actions/checkout@v4

- name: Build binary (Linux in Ubuntu 25.10 container)
if: matrix.name == 'linux'
shell: bash
run: |
# Docker container with Ubuntu 25.10 and build the binary inside it
rm -rf dist/*
docker run --rm \
-v "$PWD:/workspace" \
-w /workspace \
ubuntu:25.10 \
bash -c "
set -e
echo 'Setting up Ubuntu 25.10 build environment...'

apt-get update -y
apt-get install -y curl python3 python3-pip python3-venv binutils

# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH=\"\$HOME/.local/bin:\$PATH\"

echo 'Building binary with uv...'
uv sync
uv run build.py

echo 'Build completed. Checking output:'
ls -la dist/
"

- name: Setup uv for Windows/macOS
if: matrix.name != 'linux'
uses: astral-sh/setup-uv@v4

- name: Build binary (Windows/macOS native)
if: matrix.name != 'linux'
shell: bash
run: |
rm -rf dist/*
uv sync
uv run build.py

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: perfecto-mcp-${{ matrix.name }}-${{ matrix.arch }}
path: dist/

commit-artifacts:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/

- name: Organize artifacts into dist/
shell: bash
run: |
mkdir -p dist/
# Copy all binaries from artifact directories to dist/
# upload-artifacts job does not preserve the executable permission
# so we need to set it manually: https://github.com/actions/download-artifact?tab=readme-ov-file#limitations

if [ -d "artifacts/perfecto-mcp-linux-amd64" ]; then
cp artifacts/perfecto-mcp-linux-amd64/* dist/
chmod +x dist/perfecto-mcp-linux-amd64
echo "Copied Linux AMD64 binary"
fi
if [ -d "artifacts/perfecto-mcp-linux-arm64" ]; then
cp artifacts/perfecto-mcp-linux-arm64/* dist/
chmod +x dist/perfecto-mcp-linux-arm64
echo "Copied Linux ARM64 binary"
fi
if [ -d "artifacts/perfecto-mcp-windows-amd64" ]; then
cp artifacts/perfecto-mcp-windows-amd64/* dist/
echo "Copied Windows AMD64 binary"
fi
if [ -d "artifacts/perfecto-mcp-macos-arm64" ]; then
cp artifacts/perfecto-mcp-macos-arm64/* dist/
chmod +x dist/perfecto-mcp-macos-arm64
echo "Copied macOS ARM64 binary"
fi
if [ -d "artifacts/perfecto-mcp-macos-amd64" ]; then
cp artifacts/perfecto-mcp-macos-amd64/* dist/
chmod +x dist/perfecto-mcp-macos-amd64
echo "Copied macOS AMD64 binary"
fi

echo "Final dist/ contents:"
ls -la dist/ || echo "No dist/ directory found"

- name: Commit all artifacts to repository
shell: bash
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add dist/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "[skip ci] Update all binary artifacts"
git push
fi

4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_run:
workflows: ["Build Binaries"]
types: [completed]
branches: [main, GITHUB_ACTIONS]
branches: [main]
release:
types: [published]
workflow_dispatch:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build.yaml
workflow: build.yml
run_id: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'release') && '' || github.event.workflow_run.id }}
name_is_regexp: true
name: perfecto-mcp-.*
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ __pycache__/
perfecto_mcp.egg-info/
*.py[oc]
build/
dist/
wheels/
*.egg-info

Expand Down
3 changes: 2 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def build():
'main.py',
'--onefile',
'--version-file=version_info.txt',
f'--add-data=pyproject.toml{sep}app.png{sep}.',
f'--add-data=pyproject.toml{sep}.',
f'--add-data=resources/app.png{sep}resources',
f'--name={name}',
f'--icon={icon}',
'--clean',
Expand Down
Binary file added dist/perfecto-mcp-linux-amd64
Binary file not shown.
Binary file added dist/perfecto-mcp-macos-amd64
Binary file not shown.
Binary file added dist/perfecto-mcp-macos-arm64
Binary file not shown.
Binary file added dist/perfecto-mcp-windows-amd64.exe
Binary file not shown.