vestige/.github/workflows/release.yml
Sam Valladares 0bcceab717 fix(ci): use vendored-openssl and actions-rust-cross
Two-pronged fix for cross-compilation:

1. git2 with vendored-openssl feature - compiles OpenSSL from source,
   eliminating system dependency issues across all platforms

2. houseabsolute/actions-rust-cross@v1 - dedicated GitHub Action that
   properly handles cross-compilation with Docker containers

Sources:
- https://github.com/rust-lang/git2-rs
- https://github.com/houseabsolute/actions-rust-cross

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 02:18:18 -06:00

74 lines
1.9 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# macOS ARM64 (Apple Silicon)
- target: aarch64-apple-darwin
os: macos-latest
# macOS x86_64 (Intel)
- target: x86_64-apple-darwin
os: macos-13
# Linux x86_64
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
# Linux ARM64 (uses cross via actions-rust-cross)
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.target }}
args: "--locked --release --package vestige-mcp"
strip: true
- name: Package
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/vestige-mcp dist/ 2>/dev/null || true
cp target/${{ matrix.target }}/release/vestige dist/ 2>/dev/null || true
cd dist
if [ -f vestige-mcp ]; then
tar czf vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp vestige 2>/dev/null || tar czf vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vestige-mcp-${{ matrix.target }}
path: dist/vestige-mcp-${{ matrix.target }}.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*.tar.gz
generate_release_notes: true