-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.4 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (45 loc) · 1.4 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
name: Release & Homebrew Distribution
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-and-release:
name: Build Multi-Arch Binaries (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-14
target: aarch64-apple-darwin
artifact_name: agentprof-darwin-arm64
- os: macos-13
target: x86_64-apple-darwin
artifact_name: agentprof-darwin-x86_64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: agentprof-linux-x86_64
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build Release Binary
run: cargo build --release --target ${{ matrix.target }}
- name: Package Binary
run: |
mkdir -p dist
tar -czf "dist/${{ matrix.artifact_name }}.tar.gz" -C "target/${{ matrix.target }}/release" agentprof
cd dist
shasum -a 256 "${{ matrix.artifact_name }}.tar.gz" > "${{ matrix.artifact_name }}.tar.gz.sha256"
- name: Upload Artifacts to Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}