Skip to content

v0.4.5

v0.4.5 #12

Workflow file for this run

name: Build Rust binaries
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: Version to build (e.g. v0.4.1)
required: true
type: string
jobs:
build-binary:
runs-on: ${{ matrix.target.runner }}
permissions:
contents: write
id-token: write
strategy:
fail-fast: false
matrix:
target:
- name: linux-x86_64
runner: ubuntu-latest
ext: ""
target: x86_64-unknown-linux-gnu
- name: windows-x86_64
runner: windows-latest
ext: ".exe"
target: x86_64-pc-windows-msvc
- name: macos-x86_64
runner: macos-latest
ext: ""
target: x86_64-apple-darwin
- name: linux-arm64
runner: ubuntu-latest
ext: ""
target: aarch64-unknown-linux-gnu
- name: windows-arm64
runner: windows-latest
ext: ".exe"
target: aarch64-pc-windows-msvc
- name: macos-arm64
runner: macos-latest
ext: ""
target: aarch64-apple-darwin
steps:
- name: Get release tag value
id: version-tag
run: |
if [ -n "${{ inputs.version }}" ]; then
echo "ref=${{ inputs.version }}" >> $GITHUB_OUTPUT
else
ref=$(echo "$GITHUB_REF" | cut -d '/' -f3)
echo "ref=$ref" >> $GITHUB_OUTPUT
fi
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
path: checkout-main
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ steps.version-tag.outputs.ref }}
path: checkout-tag
- name: Add target config for arm64 on Linux
if: ${{ matrix.target.name == 'linux-arm64' }}
run: |
sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu
mkdir -p checkout-tag/.cargo
echo '[target.aarch64-unknown-linux-gnu]' >> checkout-tag/.cargo/config
echo 'linker = "aarch64-linux-gnu-gcc"' >> checkout-tag/.cargo/config
- name: Build binary
uses: houseabsolute/[email protected]
with:
command: build
target: ${{ matrix.target.target }}
args: "--locked --release"
working-directory: ${{ github.workspace }}/checkout-tag
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
tag: ${{ steps.version-tag.outputs.ref }}
file: checkout-tag/target/${{ matrix.target.target }}/release/elasticsearch-core-mcp-server${{ matrix.target.ext }}
asset_name: elasticsearch-core-mcp-server-${{ steps.version-tag.outputs.ref }}-${{ matrix.target.name }}${{ matrix.target.ext }}
overwrite: true