mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-02-14 18:09:51 +00:00
* Add MCP Registry support with MCPB package format - Update release workflow to create .mcpb artifacts for MCP Registry - Update server.json to use MCPB registry type with GitHub namespace - Use io.github.kubeshark/mcp namespace for GitHub authentication - Add SHA256 placeholders (to be updated after first release) * Add automated MCP Registry publishing to release workflow - Add workflow_dispatch trigger with dry_run option for testing - Add mcp-publish job that runs after release completes - Generate server.json dynamically with correct version and SHA256 hashes - Install and run mcp-publisher automatically - Update static server.json to reference file with placeholders - Add MCP Registry section to README The release workflow now automatically publishes to the MCP Registry when a new version is tagged. No manual steps required. * Refactor: Extract MCP publishing to separate workflow - Create mcp-publish.yml that triggers on release:published - Simplify release.yml to focus on building and releasing - MCP workflow has its own workflow_dispatch for testing - Cleaner separation of concerns * Address PR review feedback - Update actions/checkout to v4 - Add OIDC permissions for MCP Registry authentication - Change trigger from release:published to workflow_call - Release workflow now calls mcp-publish after artifacts are uploaded - Keep workflow_dispatch for manual testing * Add mcp-publisher login step before publish
78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
on:
|
|
push:
|
|
# Sequence of patterns matched against refs/tags
|
|
tags:
|
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
name: Release
|
|
|
|
concurrency:
|
|
group: kubeshark-publish-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
release:
|
|
name: Build and publish a new release
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.version.outputs.tag }}
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Version
|
|
id: version
|
|
shell: bash
|
|
run: |
|
|
{
|
|
echo "tag=${GITHUB_REF#refs/*/}"
|
|
echo "build_timestamp=$(date +%s)"
|
|
echo "branch=${GITHUB_REF#refs/heads/}"
|
|
} >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build
|
|
run: make build-all VER='${{ steps.version.outputs.tag }}' BUILD_TIMESTAMP='${{ steps.version.outputs.build_timestamp }}'
|
|
|
|
- name: Log the version into a .txt file
|
|
shell: bash
|
|
run: |
|
|
echo '${{ steps.version.outputs.tag }}' >> bin/version.txt
|
|
|
|
- name: Create MCP Registry artifacts
|
|
shell: bash
|
|
run: |
|
|
cd bin
|
|
# Create .mcpb copies for MCP Registry (URL must contain "mcp")
|
|
for f in kubeshark_linux_amd64 kubeshark_linux_arm64 kubeshark_darwin_amd64 kubeshark_darwin_arm64; do
|
|
if [ -f "$f" ]; then
|
|
cp "$f" "${f/kubeshark_/kubeshark-mcp_}.mcpb"
|
|
shasum -a 256 "${f/kubeshark_/kubeshark-mcp_}.mcpb" > "${f/kubeshark_/kubeshark-mcp_}.mcpb.sha256"
|
|
fi
|
|
done
|
|
# Handle Windows executable
|
|
if [ -f "kubeshark.exe" ]; then
|
|
cp kubeshark.exe kubeshark-mcp_windows_amd64.mcpb
|
|
shasum -a 256 kubeshark-mcp_windows_amd64.mcpb > kubeshark-mcp_windows_amd64.mcpb.sha256
|
|
fi
|
|
|
|
- name: Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
artifacts: "bin/*"
|
|
tag: ${{ steps.version.outputs.tag }}
|
|
prerelease: false
|
|
bodyFile: 'bin/README.md'
|
|
|
|
mcp-publish:
|
|
name: Publish to MCP Registry
|
|
needs: [release]
|
|
uses: ./.github/workflows/mcp-publish.yml
|
|
with:
|
|
release_tag: ${{ needs.release.outputs.version }}
|