name: Release
on:
push:
tags: ['v*']
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: linux-x86_64
- os: macos-latest
target: x86_64-apple-darwin
name: macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
name: macos-arm64
- os: windows-latest
target: x86_64-pc-windows-msvc
name: windows-x86_64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --release --target ${{ matrix.target }} --bin i-ching-mcp-server
- name: Package
shell: bash
run: |
cd target/${{ matrix.target }}/release
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
7z a ../../../i-ching-mcp-server-${{ matrix.name }}.zip i-ching-mcp-server.exe
else
tar czf ../../../i-ching-mcp-server-${{ matrix.name }}.tar.gz i-ching-mcp-server
fi
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
files: |
i-ching-mcp-server-*.tar.gz
i-ching-mcp-server-*.zip