Skip to content
Open
Show file tree
Hide file tree
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
23 changes: 22 additions & 1 deletion .github/workflows/memos-local-plugin-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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}."
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:

jobs:
deploy:
if: startsWith(github.event.release.tag_name, 'v')

runs-on: ubuntu-latest

Expand Down
Loading