Skip to content

fix: fixes, bump version #9

fix: fixes, bump version

fix: fixes, bump version #9

Workflow file for this run

name: Release and Publish
on:
push:
branches:
- main
paths:
- 'server.json'
- 'bundle/manifest.json'
- 'package.json'
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 1.0.5)'
required: true
type: string
jobs:
release-and-publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Get version from server.json
id: version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
VERSION="${{ inputs.version }}"
else
VERSION=$(jq -r '.version' server.json)
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "TAG=v$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Check if tag exists
id: check_tag
run: |
TAG="v${{ steps.version.outputs.VERSION }}"
# Fetch all tags from remote
git fetch --tags --force
# Check if tag exists locally or remotely
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "::warning::Tag $TAG already exists locally, skipping release"
elif git ls-remote --tags origin | grep -q "refs/tags/$TAG"; then
echo "exists=true" >> $GITHUB_OUTPUT
echo "::warning::Tag $TAG already exists on remote, skipping release"
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG does not exist, will create release"
fi
- name: Sync version across files
if: steps.check_tag.outputs.exists == 'false'
run: |
VERSION="${{ steps.version.outputs.VERSION }}"
# Ensure all files have the same version
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" bundle/manifest.json
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" server.json
echo "Synced version to $VERSION across all files"
- name: Build MCPB bundle
if: steps.check_tag.outputs.exists == 'false'
run: |
npm run build:mcpb
- name: Verify MCPB file
if: steps.check_tag.outputs.exists == 'false'
run: |
if [ ! -f dist/pfx-mcp-server.mcpb ]; then
echo "Error: MCPB file not created"
exit 1
fi
FILE_SIZE=$(du -h dist/pfx-mcp-server.mcpb | cut -f1)
echo "MCPB file size: $FILE_SIZE"
# List contents of MCPB (it's a ZIP file)
unzip -l dist/pfx-mcp-server.mcpb
- name: Create Git Tag
if: steps.check_tag.outputs.exists == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "${{ steps.version.outputs.TAG }}" -m "Release ${{ steps.version.outputs.TAG }}"
git push origin "${{ steps.version.outputs.TAG }}"
- name: Create Release
if: steps.check_tag.outputs.exists == 'false'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.TAG }}
name: Release ${{ steps.version.outputs.TAG }}
body: |
## Proffix Px5 MCP Server ${{ steps.version.outputs.VERSION }}
### 📦 Installation Options
#### Option 1: One-Click Installation (Recommended)
1. Download `pfx-mcp-server.mcpb` below
2. Double-click the file to install in Claude Desktop
3. Configure your Proffix credentials in the UI
#### Option 2: Manual Installation
See [README.md](https://github.com/pitwch/pfx-mcp-server#readme) for manual setup instructions.
### 🔗 Links
- **Documentation**: https://mcp.pfx.ch
- **API Key Request**: https://mcp.pfx.ch/request-api-key.html
- **Server Status**: https://mcp.pfx.ch/api/version
### 📋 What's Included
- MCP HTTP Bridge script
- Pre-configured manifest for Claude Desktop
- Support for 120+ Proffix Px5 endpoints
files: |
dist/pfx-mcp-server.mcpb
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
if: steps.check_tag.outputs.exists == 'false'
uses: actions/upload-artifact@v4
with:
name: pfx-mcp-server-mcpb
path: dist/pfx-mcp-server.mcpb
retention-days: 90
- name: Install MCP Publisher
if: steps.check_tag.outputs.exists == 'false'
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
- name: Login to MCP Registry
if: steps.check_tag.outputs.exists == 'false'
run: ./mcp-publisher login dns --domain pfx.ch --private-key ${{ secrets.MCP_PRIVATE_KEY }}
- name: Publish to MCP Registry
if: steps.check_tag.outputs.exists == 'false'
run: ./mcp-publisher publish