tangled
alpha
login
or
join now
treethought.xyz
/
obsidian-atmosphere
19
fork
atom
Various AT Protocol integrations with obsidian
19
fork
atom
overview
issues
pulls
pipelines
add release workflow
treethought
1 month ago
b9880cab
2b0df591
+36
-20
3 changed files
expand all
collapse all
unified
split
.github
workflows
release.yml
manifest.json
src
main.ts
+34
.github/workflows/release.yml
···
1
1
+
name: Release Obsidian Plugin
2
2
+
3
3
+
on:
4
4
+
push:
5
5
+
tags:
6
6
+
- "*"
7
7
+
8
8
+
jobs:
9
9
+
build:
10
10
+
runs-on: ubuntu-latest
11
11
+
12
12
+
steps:
13
13
+
- uses: actions/checkout@v4
14
14
+
15
15
+
- name: Use Node.js
16
16
+
uses: actions/setup-node@v4
17
17
+
with:
18
18
+
node-version: "18.x"
19
19
+
20
20
+
- name: Install dependencies
21
21
+
run: npm install
22
22
+
23
23
+
- name: Build plugin
24
24
+
run: npm run build
25
25
+
26
26
+
- name: Create release
27
27
+
env:
28
28
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
29
+
run: |
30
30
+
tag="${{ github.ref_name }}"
31
31
+
gh release create "$tag" \
32
32
+
--title="$tag" \
33
33
+
--draft \
34
34
+
main.js manifest.json styles.css
+1
-1
manifest.json
···
1
1
{
2
2
"id": "atmark",
3
3
"name": "ATmark",
4
4
-
"version": "1.0.0",
4
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
1
-
import { Editor, MarkdownView, Notice, Plugin, WorkspaceLeaf } from "obsidian";
1
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
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
27
-
this.addCommand({
28
28
-
id: 'semble-add-card',
29
29
-
name: 'Create semble card',
30
30
-
editorCheckCallback: (checking: boolean, editor: Editor, _view: MarkdownView) => {
31
31
-
const sel = editor.getSelection()
32
32
-
33
33
-
if (!this.settings.identifier || !this.settings.appPassword) {
34
34
-
new Notice("Please set your credentials in the plugin settings to create new records.");
35
35
-
return false;
36
36
-
}
37
37
-
if (!checking) {
38
38
-
new CreateCardModal(this, sel).open();
39
39
-
}
40
40
-
return true;
41
41
-
42
42
-
},
43
43
-
})
44
26
45
27
46
28
this.addCommand({