-
Notifications
You must be signed in to change notification settings - Fork 15
89 lines (78 loc) · 2.7 KB
/
Copy pathrelease-binaries.yml
File metadata and controls
89 lines (78 loc) · 2.7 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
name: Release Binaries
on:
push:
tags:
- "a2a-agents-v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to build and upload binaries for (e.g. a2a-agents-v0.3.0)"
required: true
permissions:
contents: write
env:
# Force Node 20-pinned JavaScript actions onto Node 24 (silences the
# deprecation annotation until the actions update).
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
upload-assets:
name: Build and upload binaries
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
use_cross: false
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
use_cross: true
- target: x86_64-apple-darwin
os: macos-latest
use_cross: false
- target: aarch64-apple-darwin
os: macos-latest
use_cross: false
- target: x86_64-pc-windows-msvc
os: windows-latest
use_cross: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
with:
ref: ${{ inputs.tag || github.ref }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross
if: matrix.use_cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build binary
shell: bash
run: |
if [ "${{ matrix.use_cross }}" = "true" ]; then
cross build --release -p a2a-agents --bin a2a --target ${{ matrix.target }} --features "mcp-server,reimbursement-agent"
else
cargo build --release -p a2a-agents --bin a2a --target ${{ matrix.target }} --features "mcp-server,reimbursement-agent"
fi
- name: Package binary (Unix)
if: runner.os != 'Windows'
run: |
tar -czvf a2a-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release a2a
- name: Package binary (Windows)
if: runner.os == 'Windows'
run: |
Compress-Archive -Path target/${{ matrix.target }}/release/a2a.exe -DestinationPath a2a-${{ matrix.target }}.zip
- name: Upload Release Asset (Unix)
if: runner.os != 'Windows'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag || github.ref_name }}
files: a2a-${{ matrix.target }}.tar.gz
- name: Upload Release Asset (Windows)
if: runner.os == 'Windows'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag || github.ref_name }}
files: a2a-${{ matrix.target }}.zip