Skip to content
Merged
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
60 changes: 60 additions & 0 deletions .github/workflows/release-claude-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release Claude Desktop Plugin

on:
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:

permissions:
contents: write

jobs:
release-plugin:
name: Build and release plugin package
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout merge commit
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }}

- name: Prepare release metadata
id: meta
shell: bash
run: |
SHORT_SHA="$(git rev-parse --short HEAD)"
UTC_STAMP="$(date -u +'%Y%m%d%H%M%S')"
TAG="claude-plugin-${UTC_STAMP}-${SHORT_SHA}"
RELEASE_NAME="Claude Desktop plugin ${UTC_STAMP} (${SHORT_SHA})"

echo "short_sha=$SHORT_SHA" >> "$GITHUB_OUTPUT"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "release_name=$RELEASE_NAME" >> "$GITHUB_OUTPUT"

- name: Build plugin zip
id: build
shell: bash
run: |
chmod +x tools/build.sh
ZIP_PATH="$(tools/build.sh)"
ZIP_NAME="$(basename "$ZIP_PATH")"

echo "zip_path=$ZIP_PATH" >> "$GITHUB_OUTPUT"
echo "zip_name=$ZIP_NAME" >> "$GITHUB_OUTPUT"

- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.zip_name }}
path: ${{ steps.build.outputs.zip_path }}

- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.meta.outputs.tag }}
name: ${{ steps.meta.outputs.release_name }}
generate_release_notes: true
files: ${{ steps.build.outputs.zip_path }}
4 changes: 0 additions & 4 deletions tools/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail

echo "DEPRECATED: Use 'npm pack' from the repo root to build a distributable tarball." >&2
echo " cd $(dirname "${BASH_SOURCE[0]}")/.. && npm pack" >&2
echo "" >&2

REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
BUILD_DIR="$REPO_ROOT/build"
PLUGIN_NAME="idd-skills"
Expand Down
Loading