feat(slack): add SLACK_LIST_DMS tool and sender name in DMs (#371) #125
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to Registry (Studio) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| mcps: | |
| description: 'MCPs to publish (comma-separated, e.g. "discord-read,slack-mcp"). Leave empty to detect from changes.' | |
| required: false | |
| type: string | |
| default: '' | |
| dry_run: | |
| description: 'Dry run (preview payloads without publishing)' | |
| required: false | |
| type: boolean | |
| default: false | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| mcps: ${{ steps.detect.outputs.mcps }} | |
| has_changes: ${{ steps.detect.outputs.has_changes }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Detect MCPs to publish | |
| id: detect | |
| run: | | |
| MANUAL_MCPS="${{ github.event.inputs.mcps }}" | |
| if [ -n "$MANUAL_MCPS" ]; then | |
| echo "📋 Manual publish triggered for: $MANUAL_MCPS" | |
| CHANGED_MCPS=$(echo "$MANUAL_MCPS" | tr ',' '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | jq -R . | jq -s .) | |
| else | |
| PREVIOUS_COMMIT="${{ github.event.before }}" | |
| if [ "$PREVIOUS_COMMIT" = "0000000000000000000000000000000000000000" ] || [ -z "$PREVIOUS_COMMIT" ]; then | |
| PREVIOUS_COMMIT="HEAD~1" | |
| fi | |
| if ! git cat-file -e "$PREVIOUS_COMMIT" 2>/dev/null; then | |
| PREVIOUS_COMMIT="HEAD~1" | |
| fi | |
| CHANGED_MCPS=$(bun run scripts/detect-changed-mcps.ts "$PREVIOUS_COMMIT" HEAD) | |
| fi | |
| echo "Changed MCPs: $CHANGED_MCPS" | |
| # Filter to only MCPs that have a deco.json or app.json (publishable to registry) | |
| PUBLISHABLE='[]' | |
| for mcp in $(echo "$CHANGED_MCPS" | jq -r '.[]'); do | |
| if [ -f "$mcp/deco.json" ] || [ -f "$mcp/app.json" ]; then | |
| PUBLISHABLE=$(echo "$PUBLISHABLE" | jq -c --arg m "$mcp" '. + [$m]') | |
| fi | |
| done | |
| echo "Publishable MCPs: $PUBLISHABLE" | |
| echo "mcps=$PUBLISHABLE" >> $GITHUB_OUTPUT | |
| if [ "$PUBLISHABLE" = "[]" ]; then | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| publish: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.has_changes == 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| mcp: ${{ fromJSON(needs.detect-changes.outputs.mcps) }} | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Publish ${{ matrix.mcp }} to registry | |
| run: | | |
| if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then | |
| bun run scripts/publish-one.ts ${{ matrix.mcp }} --dry-run | |
| else | |
| bun run scripts/publish-one.ts ${{ matrix.mcp }} | |
| fi | |
| env: | |
| PUBLISH_API_KEY: ${{ secrets.PUBLISH_API_KEY }} | |
| - name: Notify success | |
| if: success() | |
| run: echo "✅ Successfully published ${{ matrix.mcp }} to registry" | |
| - name: Notify failure | |
| if: failure() | |
| run: echo "❌ Failed to publish ${{ matrix.mcp }} to registry" |