Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/notify-conanfiles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Notify conanfiles

run-name: notify conanfiles for ${{ github.ref_name }}

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: read

jobs:
# When a new release tag is pushed to milvus-common, send a repository_dispatch event
# to the conanfiles repo to trigger the release of the corresponding Conan package.
dispatch:
name: send milvus-common release dispatch
if: github.repository == 'zilliztech/milvus-common'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Send repository_dispatch to conanfiles
env:
GH_TOKEN: ${{ secrets.CONANFILES_DISPATCH_TOKEN }}
TAG: ${{ github.ref_name }}
SOURCE_REPO: zilliztech/milvus-common
run: |
set -euo pipefail

if [ -z "$GH_TOKEN" ]; then
echo "CONANFILES_DISPATCH_TOKEN is not configured" >&2
exit 1
fi

if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z][0-9A-Za-z.-]*)?$ ]]; then
echo "Unsupported tag format: $TAG" >&2
exit 1
fi

COMMIT=$(git rev-list -n 1 "$TAG")
if [ -z "$COMMIT" ]; then
echo "Unable to resolve commit for tag: $TAG" >&2
exit 1
fi

gh api repos/milvus-io/conanfiles/dispatches \
--method POST \
--field event_type=recipe-release \
--field "client_payload[tag]=${TAG}" \
--field "client_payload[commit]=${COMMIT}" \
--field "client_payload[source_repo]=${SOURCE_REPO}"
Loading