aaronsb_obsidian-mcp-plugin/.github/workflows/release.yml
Aaron Bockelie fc47349e18 chore(deps): upgrade dev toolchain — eslint 10, typescript 6, and grouped bumps
Incorporates the open dependabot dev-dependency PRs as one coherent, tightly
verified upgrade rather than five separate rebase/CI cycles, since they interact
across the build/lint toolchain:

- eslint 9.39.2 → 10.5.0 and @eslint/js 9.39.2 → 10.0.1 (#235 + #236 — these are
  coupled: @eslint/js@10 peer-requires eslint@10, so #236 could only ever resolve
  alongside #235; neither lands alone)
- typescript 5.9.3 → 6.0.3 (#237)
- typescript-eslint / @typescript-eslint/utils 8.60.1 → 8.62.0, esbuild
  0.28.0 → 0.28.1, globals 17.6.0 → 17.7.0, obsidian 1.13.0 → 1.13.1 (#246,
  which also subsumes the standalone esbuild bump in #233)
- actions/checkout v6 → v7 across all workflows (#240)

TypeScript 6 turns two tsconfig deprecations into errors. Fixed by modernizing
the config, not suppressing — Obsidian's community-plugin source review forbids
`ignoreDeprecations`-style escape hatches and rewards tight configs:

- dropped `baseUrl: "."` (TS5101) — unused; every local import is relative
- `moduleResolution: "node"` → `"bundler"` (TS5107) — the correct modern value
  for an esbuild-bundled project with extensionless imports (node16/nodenext
  would force `.js` extensions and break every relative import)

Also ran `npm audit fix` (security fixes are hold-exempt) clearing two dev/test
transitive advisories (@babel/core file-read, js-yaml merge-key DoS) that were
pre-existing on main via the jest/istanbul chain — `npm audit` now reports 0.

Verified tight: `npm run build && npm run lint && npm test` all green, 352/352
tests pass, no rule suppressions added.
2026-07-03 21:13:32 -05:00

99 lines
No EOL
3.4 KiB
YAML

name: Create Release
on:
workflow_dispatch:
inputs:
release_notes:
description: 'Additional release notes (optional)'
required: false
type: string
env:
PLUGIN_NAME: obsidian-mcp-plugin
permissions:
contents: write
id-token: write # required for build-provenance attestation (#164)
attestations: write # required for build-provenance attestation (#164)
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # Fetch full history for version bumping
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Run tests
run: npm run test
- name: Build plugin
run: npm run build
- name: Build MCPB bundle
run: node scripts/build-mcpb.mjs
- name: Get version from manifest
id: version
run: |
echo "version=$(jq -r '.version' manifest.json)" >> $GITHUB_OUTPUT
echo "name=$(jq -r '.name' manifest.json)" >> $GITHUB_OUTPUT
- name: Check if version tag exists
id: check_tag
run: |
if git rev-parse "${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Attest build provenance
if: steps.check_tag.outputs.exists == 'false'
uses: actions/attest-build-provenance@v4
with:
# Attest every asset Obsidian installs (main.js, manifest.json,
# styles.css) plus the .mcpb bundles. The portal flags any
# installable asset lacking attestation — #164 originally missed
# styles.css/manifest.json.
subject-path: |
main.js
manifest.json
styles.css
obsidian-mcp-${{ steps.version.outputs.version }}.mcpb
obsidian-mcp.mcpb
- name: Create Release
if: steps.check_tag.outputs.exists == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: ${{ steps.version.outputs.name }}
RELEASE_VERSION: ${{ steps.version.outputs.version }}
# Bind via env to avoid shell interpretation of user-supplied notes
# (backticks, $vars, etc. in the notes must NOT be evaluated).
RELEASE_NOTES_INPUT: ${{ inputs.release_notes }}
run: |
NOTES=$(printf '## %s %s\n\n%s\n\n### Claude Desktop (.mcpb connector)\nIf you connect Claude Desktop via the `.mcpb` bundle, re-import `obsidian-mcp.mcpb` from this release to update the connector — BRAT updates only the Obsidian plugin, not the Desktop bridge.\n\n### Installation via BRAT (Obsidian plugin)\n1. Install the BRAT plugin if you haven'\''t already\n2. Command palette → "BRAT: Add a beta plugin for testing"\n3. Enter: `aaronsb/obsidian-mcp-plugin`\n4. Enable the plugin in Community Plugins\n' "$RELEASE_NAME" "$RELEASE_VERSION" "$RELEASE_NOTES_INPUT")
gh release create "$RELEASE_VERSION" \
--title "$RELEASE_NAME $RELEASE_VERSION" \
--generate-notes \
--notes "$NOTES" \
--prerelease \
main.js \
manifest.json \
styles.css \
"obsidian-mcp-$RELEASE_VERSION.mcpb" \
obsidian-mcp.mcpb