-
-
Notifications
You must be signed in to change notification settings - Fork 31
97 lines (82 loc) · 2.38 KB
/
Copy pathcli_binaries.yml
File metadata and controls
97 lines (82 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build CLI Binaries
on:
push:
tags:
- 'mcp_dart_cli-v*'
workflow_dispatch:
inputs:
tag:
description: 'CLI release tag to attach assets to, for example mcp_dart_cli-v0.1.9'
required: true
type: string
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.asset }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
asset: mcp_dart-linux-x64
- os: macos-15-intel
asset: mcp_dart-macos-x64
- os: macos-14
asset: mcp_dart-macos-arm64
- os: windows-latest
asset: mcp_dart-windows-x64.exe
defaults:
run:
working-directory: packages/mcp_dart_cli
steps:
- uses: actions/checkout@v6
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Compile executable
shell: bash
run: |
mkdir -p dist
dart compile exe bin/mcp_dart.dart -o "dist/${{ matrix.asset }}"
- name: Smoke test executable
shell: bash
run: |
"./dist/${{ matrix.asset }}" --version
- name: Upload binary artifact
uses: actions/upload-artifact@v5
with:
name: ${{ matrix.asset }}
path: packages/mcp_dart_cli/dist/${{ matrix.asset }}
if-no-files-found: error
release-assets:
name: Attach binaries to release
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v6
- name: Resolve release tag
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
else
echo "tag=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
fi
- name: Download binary artifacts
uses: actions/download-artifact@v6
with:
path: dist
merge-multiple: true
- name: Add bundled skill asset
run: |
cp packages/mcp_dart_cli/lib/src/skills/mcp-developer/SKILL.md dist/mcp-developer.SKILL.md
- name: Attach binaries
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.tag.outputs.tag }}
files: dist/*
fail_on_unmatched_files: true