mirror of
https://github.com/gbrigandi/mcp-server-wazuh.git
synced 2025-07-13 15:14:48 -06:00
automated builds
This commit is contained in:
parent
6f65c7e2fe
commit
66410e8dde
75
.github/workflows/release.yml
vendored
Normal file
75
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
name: Release Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*' # Trigger on version tags like v0.1.0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create_release:
|
||||||
|
name: Create Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
steps:
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref_name }}
|
||||||
|
release_name: Release ${{ github.ref_name }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
build_binaries:
|
||||||
|
name: Build Binaries for ${{ matrix.target }}
|
||||||
|
needs: create_release
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-musl
|
||||||
|
asset_name_suffix: linux-amd64
|
||||||
|
output_name: mcp-server-wazuh
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
asset_name_suffix: windows-amd64.exe
|
||||||
|
output_name: mcp-server-wazuh.exe
|
||||||
|
- os: macos-latest # Intel runner
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
asset_name_suffix: macos-amd64
|
||||||
|
output_name: mcp-server-wazuh
|
||||||
|
- os: macos-14 # ARM64/M1 runner
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
asset_name_suffix: macos-arm64
|
||||||
|
output_name: mcp-server-wazuh
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Rust for target ${{ matrix.target }}
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Install musl-tools (Linux MUSL target only)
|
||||||
|
if: matrix.os == 'ubuntu-latest' && contains(matrix.target, 'musl')
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y musl-tools
|
||||||
|
|
||||||
|
- name: Build binary
|
||||||
|
run: cargo build --verbose --release --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./target/${{ matrix.target }}/release/${{ matrix.output_name }}
|
||||||
|
asset_name: mcp-server-wazuh-${{ matrix.asset_name_suffix }}
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
|
BIN
media/.DS_Store
vendored
BIN
media/.DS_Store
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user