mirror of
https://github.com/blamouche/obsidian-any-ai-code.git
synced 2026-07-22 06:53:38 +00:00
The Obsidian submission bot rejected obsidian-any-ai-cli because the guideline asks plugins not to include "obsidian" in their id (the id becomes the plugin folder name; brevity helps sorting). Verified any-ai-cli is free in the public community-plugins.json, then renamed the id everywhere it surfaces: - manifest.json (id) and bumped to 0.1.36 - versions.json (added 0.1.36 entry) - package.json (npm name) and package-lock.json (re-synced) - .github/workflows/release.yml (PLUGIN_ID env var → release zip name) - README.md install paths and zip filename references Existing personal installs must rename their plugin folder to .obsidian/plugins/any-ai-cli before this version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
93 lines
3 KiB
YAML
93 lines
3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-and-release:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
PLUGIN_ID: any-ai-cli
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
|
|
- name: Install
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Stage plugin bundle
|
|
run: |
|
|
set -e
|
|
STAGE_DIR="dist/${PLUGIN_ID}"
|
|
mkdir -p "${STAGE_DIR}"
|
|
# Files required at runtime by the plugin (see README "Install in a Vault").
|
|
# node-pty is a native module: ship package.json + package-lock.json so
|
|
# the user installs it for their own platform via `npm install --omit=dev`.
|
|
for f in manifest.json main.js styles.css versions.json pty-proxy.js pty-bridge.py package.json package-lock.json; do
|
|
if [ ! -f "$f" ]; then
|
|
echo "Missing required plugin file: $f"
|
|
exit 1
|
|
fi
|
|
cp "$f" "${STAGE_DIR}/"
|
|
done
|
|
|
|
- name: Create plugin zip
|
|
run: |
|
|
set -e
|
|
cd dist
|
|
zip -r "../${PLUGIN_ID}-${GITHUB_REF_NAME}.zip" "${PLUGIN_ID}"
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
name: ${{ github.ref_name }}
|
|
tag_name: ${{ github.ref_name }}
|
|
generate_release_notes: true
|
|
fail_on_unmatched_files: true
|
|
# Per Obsidian release guide, releases are created as drafts so the
|
|
# author can review release notes before publishing.
|
|
draft: true
|
|
body: |
|
|
## Install
|
|
|
|
1. Download `${{ env.PLUGIN_ID }}-${{ github.ref_name }}.zip` below.
|
|
2. Unzip it inside your vault's plugin folder so the resulting path is `/PATH/TO/VAULT/.obsidian/plugins/${{ env.PLUGIN_ID }}/`.
|
|
3. Enable the plugin in Obsidian → Settings → Community plugins.
|
|
|
|
No commands required. The plugin uses an embedded Python PTY bridge fallback so it works out of the box on macOS / Linux, and falls back to direct pipe mode on Windows.
|
|
|
|
### Optional — native PTY backend
|
|
|
|
For best terminal fidelity (full-screen TUI rendering, resize), install the native `node-pty` module after unzipping:
|
|
|
|
```bash
|
|
cd "/PATH/TO/VAULT/.obsidian/plugins/${{ env.PLUGIN_ID }}"
|
|
npm install --omit=dev
|
|
```
|
|
|
|
Then reload the plugin.
|
|
|
|
### Manual install / Obsidian auto-update
|
|
|
|
`main.js`, `manifest.json`, and `styles.css` are also attached as standalone files for compatibility with Obsidian's plugin update protocol and tools like BRAT.
|
|
files: |
|
|
${{ env.PLUGIN_ID }}-${{ github.ref_name }}.zip
|
|
main.js
|
|
manifest.json
|
|
styles.css
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|