From da0cc817ab4f44b5acae673fb07ebd2dabefec16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=96=E8=80=80?= Date: Wed, 15 Jul 2026 17:47:21 +0800 Subject: [PATCH 1/2] ci: create release for OpenClaw local plugin publish --- .../workflows/memos-local-plugin-publish.yml | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/memos-local-plugin-publish.yml b/.github/workflows/memos-local-plugin-publish.yml index f7e0172a5..f118f9df1 100644 --- a/.github/workflows/memos-local-plugin-publish.yml +++ b/.github/workflows/memos-local-plugin-publish.yml @@ -14,6 +14,9 @@ on: description: "Git ref to build from (branch, tag, or SHA). Leave blank to use the branch selected above." required: false default: "" + release_notes: + description: "Markdown release notes for GitHub Release and docs changelog. Include a ## Changelog section." + required: true concurrency: group: memos-local-plugin-publish @@ -133,15 +136,23 @@ jobs: env: GH_TOKEN: ${{ github.token }} RELEASE_VERSION: ${{ inputs.version }} + RELEASE_NOTES: ${{ inputs.release_notes }} DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} run: | set -euo pipefail + if [ -z "$(printf '%s' "${RELEASE_NOTES}" | tr -d '[:space:]')" ]; then + echo "::error::release_notes is required so Doc Agent can update docs." + exit 1 + fi + git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - release_tag="memos-local-plugin-v${RELEASE_VERSION}" + release_tag="openclaw-local-plugin-v${RELEASE_VERSION}" release_branch="release/${release_tag}" release_title="release: @memtensor/memos-local-plugin v${RELEASE_VERSION}" + release_notes_file="$(mktemp)" + printf '%s\n' "${RELEASE_NOTES}" > "${release_notes_file}" git add apps/memos-local-plugin/package.json apps/memos-local-plugin/package-lock.json created_release_commit=false @@ -166,6 +177,16 @@ jobs: git push origin "refs/tags/${release_tag}" fi + if gh release view "${release_tag}" --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1; then + echo "GitHub Release ${release_tag} already exists; leaving it unchanged." + else + gh release create "${release_tag}" \ + --repo "${GITHUB_REPOSITORY}" \ + --target "$(git rev-parse HEAD)" \ + --title "OpenClaw Local Plugin v${RELEASE_VERSION}" \ + --notes-file "${release_notes_file}" + fi + if [ "${created_release_commit}" = "true" ]; then if gh pr view "${release_branch}" --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1; then echo "Release PR already exists for ${release_branch}." From 9c4982722f1c3f7d2708c7a21f1e0fd27bd54aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=96=E8=80=80?= Date: Wed, 15 Jul 2026 21:03:32 +0800 Subject: [PATCH 2/2] ci: restrict PyPI publish to main releases --- .github/workflows/python-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 846d7e3aa..beb66f731 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -9,6 +9,7 @@ permissions: jobs: deploy: + if: startsWith(github.event.release.tag_name, 'v') runs-on: ubuntu-latest