Skip to content

Create Release

Create Release #8

Workflow file for this run

name: Create Release
on:
# Manual trigger from GitHub Actions tab
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 1.0.0)'
required: true
type: string
prerelease:
description: 'Mark as pre-release?'
required: false
type: boolean
default: false
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for changelog generation
- name: Validate version format
run: |
if ! [[ "${{ github.event.inputs.version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Version must be in format X.Y.Z (e.g., 1.0.0)"
exit 1
fi
- name: Check if tag already exists
run: |
if git rev-parse "v${{ github.event.inputs.version }}" >/dev/null 2>&1; then
echo "Error: Tag v${{ github.event.inputs.version }} already exists"
exit 1
fi
- name: Update manifest version
run: |
VERSION="${{ github.event.inputs.version }}"
node -e "const fs=require('fs');const path='manifest/manifest.json';const m=JSON.parse(fs.readFileSync(path,'utf8'));m.meta.version='${VERSION}';fs.writeFileSync(path, JSON.stringify(m, null, 2)+'\\n');"
echo "Updated manifest/manifest.json to version $VERSION"
cat manifest/manifest.json | grep version
- name: Generate manifests and consumer bundles
run: |
echo "🚀 Generating platform manifests..."
node scripts/generate-manifests.js
echo "🚀 Generating consumer bundles..."
node scripts/generate-consumer-targets.js
echo "🧪 Validating consumer bundles..."
node scripts/validate-consumer-targets.js
- name: Sync README and package versions
run: |
node scripts/sync-version.js
- name: Build packages
run: |
# Build complete package for Claude Code
chmod +x scripts/package-for-claude-ai.sh
./scripts/package-for-claude-ai.sh
# Build individual skill packages for claude.ai web
npm run package:claudeai
- name: Generate changelog
id: changelog
run: |
VERSION="${{ github.event.inputs.version }}"
SKILL_COUNT=$(node -p "require('./manifest/manifest.json').skills.length")
# Get the last tag, or use initial commit if no tags
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
echo "Generating changelog from $LAST_TAG to HEAD..."
# Generate changelog
CHANGELOG=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s (%h)" --no-merges)
if [ -z "$CHANGELOG" ]; then
CHANGELOG="- Initial release"
fi
# Create release notes
cat > release-notes.md << EOF
# Clinical Toolkit v${VERSION}
## What's Changed
${CHANGELOG}
## Installation
### For Claude.ai (Web & iOS)
**Individual Skills (Recommended):**
1. Download individual skill .zip files from the Assets section below
2. Open [Claude.ai](https://claude.ai) or the iOS app
3. Go to **Settings → Capabilities**
4. Enable the **Skills** toggle
5. Click **Upload skill**
6. Select a skill .zip file (e.g., \`depression-screening.zip\`)
7. Turn the skill toggle **ON**
8. Repeat for each skill you want to use
**Note:** claude.ai requires exactly one SKILL.md per upload. Use the individual skill .zip files, not the complete package.
### For Claude Code (CLI)
**Complete Package:**
\`\`\`bash
# Download clinical-toolkit-complete.zip from Assets
# Extract and install
claude install-plugin clinical-toolkit-complete.zip
\`\`\`
**Or install from repository:**
\`\`\`bash
git clone https://github.com/rhavekost/clinical-toolkit.git
cd clinical-toolkit
claude install-skill skills/depression-screening
claude install-skill skills/anxiety-screening
# ... (install each skill individually)
\`\`\`
## Included Skills
This package includes ${SKILL_COUNT} clinical mental health skills.
See \`manifest/manifest.json\` for the current list.
## Support
For questions or issues, please [open an issue](https://github.com/rhavekost/clinical-toolkit/issues).
EOF
echo "Release notes created"
cat release-notes.md
- name: Commit version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add manifest/manifest.json
git add .claude-plugin/manifest.json
git add .github/copilot/manifest.json
git add .cursor/manifest.json
git add .gemini/manifest.json
git add .codex/manifest.json
git add skills/*/SKILL.md
git add dist/consumer
git add README.md
git add package.json
# Only commit if there are changes
if git diff --cached --quiet; then
echo "No changes to manifest.json - already at version ${{ github.event.inputs.version }}"
else
git commit -m "chore: bump version to ${{ github.event.inputs.version }}"
git push
echo "Version bumped and pushed"
fi
- name: Create Git tag
run: |
git tag -a "v${{ github.event.inputs.version }}" -m "Release v${{ github.event.inputs.version }}"
git push origin "v${{ github.event.inputs.version }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.event.inputs.version }}
name: Clinical Toolkit v${{ github.event.inputs.version }}
body_path: release-notes.md
files: |
clinical-toolkit-complete.zip
dist/claudeai/*.zip
prerelease: ${{ github.event.inputs.prerelease }}
generate_release_notes: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release Summary
run: |
echo "✅ Release v${{ github.event.inputs.version }} created successfully!"
echo ""
echo "📦 Package: clinical-toolkit-complete.zip"
echo "🔗 Release: https://github.com/${{ github.repository }}/releases/tag/v${{ github.event.inputs.version }}"
echo ""
echo "Users can now download and install the complete toolkit from the Releases page."