Skip to content

chore: v2.3.2

chore: v2.3.2 #4

Workflow file for this run

name: Release MCPB
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Sync manifest versions with package.json
run: |
pkg_version=$(jq -r .version package.json)
jq --arg v "$pkg_version" '.version = $v' manifest-minimal.json > manifest-minimal.tmp.json
mv manifest-minimal.tmp.json manifest-minimal.json
jq --arg v "$pkg_version" '.version = $v' manifest-full.json > manifest-full.tmp.json
mv manifest-full.tmp.json manifest-full.json
- name: Build project
run: npm run build
- name: Install dependencies for packaging
run: npm ci --omit=dev
- name: Install MCPB
run: npm install -g @anthropic-ai/mcpb
- name: Package extensions
run: |
current_dir=$(basename "$PWD")
# Package minimal version
cp manifest-minimal.json manifest.json
mcpb pack
mv "${current_dir}.mcpb" "${current_dir}-minimal.mcpb"
# Package full version
cp manifest-full.json manifest.json
mcpb pack
mv "${current_dir}.mcpb" "${current_dir}-full.mcpb"
# Set environment variables
echo "MCPB_MINIMAL_FILENAME=${current_dir}-minimal.mcpb" >> $GITHUB_ENV
echo "MCPB_FULL_FILENAME=${current_dir}-full.mcpb" >> $GITHUB_ENV
- name: Upload minimal release asset
uses: svenstaro/upload-release-action@7027b7670c56b9473901daad1fb8a09ab534688e
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.MCPB_MINIMAL_FILENAME }}
asset_name: ${{ env.MCPB_MINIMAL_FILENAME }}
tag: ${{ github.ref }}
overwrite: true
- name: Upload full release asset
uses: svenstaro/upload-release-action@7027b7670c56b9473901daad1fb8a09ab534688e
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.MCPB_FULL_FILENAME }}
asset_name: ${{ env.MCPB_FULL_FILENAME }}
tag: ${{ github.ref }}
overwrite: true