mirror of
https://github.com/limrun-inc/skills.git
synced 2026-09-14 15:38:52 +08:00
35 lines
1.4 KiB
YAML
35 lines
1.4 KiB
YAML
# Tags and releases vX.Y.Z whenever main's distribution.json version has no
|
|
# tag yet, so marketplace channels that track releases (Gemini CLI, external
|
|
# listings pinning refs) update without manual tagging.
|
|
name: Release
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Tag and release if version is new
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
VERSION="$(node -p "require('./distribution.json').version")"
|
|
TAG="v${VERSION}"
|
|
if git ls-remote --tags origin "refs/tags/${TAG}" | grep -q .; then
|
|
git fetch origin "refs/tags/${TAG}:refs/tags/${TAG}" --no-tags
|
|
if git diff --quiet "${TAG}" HEAD -- skills/ assets/ distribution.json plugin.json mcp.json .mcp.json gemini-extension.json .claude-plugin .codex-plugin .agents; then
|
|
echo "${TAG} already exists with the same source; nothing to do."
|
|
exit 0
|
|
fi
|
|
echo "::error::${TAG} exists but main's content differs; a concurrent bump landed on a released version. Bump again." >&2
|
|
exit 1
|
|
fi
|
|
gh release create "${TAG}" --target "${GITHUB_SHA}" --title "limrun plugin ${VERSION}" \
|
|
--notes "Generated release for distribution.json version ${VERSION}. See merged PRs for changes."
|