Various AT Protocol integrations with obsidian

add release workflow

+36 -20
+34
.github/workflows/release.yml
··· 1 + name: Release Obsidian Plugin 2 + 3 + on: 4 + push: 5 + tags: 6 + - "*" 7 + 8 + jobs: 9 + build: 10 + runs-on: ubuntu-latest 11 + 12 + steps: 13 + - uses: actions/checkout@v4 14 + 15 + - name: Use Node.js 16 + uses: actions/setup-node@v4 17 + with: 18 + node-version: "18.x" 19 + 20 + - name: Install dependencies 21 + run: npm install 22 + 23 + - name: Build plugin 24 + run: npm run build 25 + 26 + - name: Create release 27 + env: 28 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 + run: | 30 + tag="${{ github.ref_name }}" 31 + gh release create "$tag" \ 32 + --title="$tag" \ 33 + --draft \ 34 + main.js manifest.json styles.css
+1 -1
manifest.json
··· 1 1 { 2 2 "id": "atmark", 3 3 "name": "ATmark", 4 - "version": "1.0.0", 4 + "version": "0.1.0", 5 5 "minAppVersion": "0.15.0", 6 6 "description": "Obsidian plugin for AT Protocol bookmark platforms", 7 7 "author": "treethought",
+1 -19
src/main.ts
··· 1 - import { Editor, MarkdownView, Notice, Plugin, WorkspaceLeaf } from "obsidian"; 1 + import { Notice, Plugin, WorkspaceLeaf } from "obsidian"; 2 2 import type { Client } from "@atcute/client"; 3 3 import { DEFAULT_SETTINGS, AtProtoSettings, SettingTab } from "./settings"; 4 4 import { createAuthenticatedClient, createPublicClient } from "./auth"; 5 5 import { getProfile } from "./lib"; 6 6 import { SembleCollectionsView, VIEW_TYPE_SEMBLE_COLLECTIONS } from "views/collections"; 7 7 import { SembleCardsView, VIEW_TYPE_SEMBLE_CARDS } from "views/cards"; 8 - import { CreateCardModal } from "components/cardForm"; 9 8 import type { ProfileData } from "components/profileIcon"; 10 9 11 10 export default class ATmarkPlugin extends Plugin { ··· 24 23 this.registerView(VIEW_TYPE_SEMBLE_CARDS, (leaf) => { 25 24 return new SembleCardsView(leaf, this); 26 25 }); 27 - this.addCommand({ 28 - id: 'semble-add-card', 29 - name: 'Create semble card', 30 - editorCheckCallback: (checking: boolean, editor: Editor, _view: MarkdownView) => { 31 - const sel = editor.getSelection() 32 - 33 - if (!this.settings.identifier || !this.settings.appPassword) { 34 - new Notice("Please set your credentials in the plugin settings to create new records."); 35 - return false; 36 - } 37 - if (!checking) { 38 - new CreateCardModal(this, sel).open(); 39 - } 40 - return true; 41 - 42 - }, 43 - }) 44 26 45 27 46 28 this.addCommand({