Skip to content

Commit 0b8bc11

Browse files
committed
ci: add GitHub Actions workflow for plugin release
1 parent 2fc122f commit 0b8bc11

File tree

5 files changed

+62
-4
lines changed

5 files changed

+62
-4
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Logseq Plugin
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
paths-ignore:
8+
- 'README.md'
9+
workflow_dispatch:
10+
11+
env:
12+
PLUGIN_NAME: ${{ github.event.repository.name }}
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Use Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: "22.x"
25+
26+
- uses: pnpm/action-setup@v4
27+
with:
28+
version: 9.4.0
29+
30+
- name: Build
31+
id: build
32+
run: |
33+
pnpm i && pnpm run build
34+
mkdir ${{ env.PLUGIN_NAME }}
35+
cp README.md package.json icon.svg ${{ env.PLUGIN_NAME }}
36+
mv dist ${{ env.PLUGIN_NAME }}
37+
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
38+
ls
39+
echo "tag_name=git tag --sort version:refname | tail -n 1" >> $GITHUB_OUTPUT
40+
41+
- name: Release
42+
run: npx semantic-release
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# logseq-runit-plugin
22

33
A Logseq plugin for running code snippets directly inside your notes.
4-
Supports JavaScript, Python (via [Pyodide](https://pyodide.org/)), Scheme (via [BiwaScheme](https://www.biwascheme.org/)), and Clojure (via [SCI](https://github.com/babashka/sci)) with interactive output.
4+
Supports JavaScript, Python (via [Pyodide](https://pyodide.org/)), Scheme (via [BiwaScheme](https://www.biwascheme.org/)), and Clojure (via [sci](https://github.com/babashka/sci)) with interactive output.
55
Built for [Logseq](https://logseq.com/).
66

77
![Demo](images/p2.gif)
@@ -134,7 +134,7 @@ The plugin supports running Scheme code snippets via BiwaScheme, allowing you to
134134

135135
### Clojure Support
136136

137-
The plugin supports running Clojure code snippets via SCI (Small Clojure Interpreter), allowing you to execute ClojureScript code directly in your notes:
137+
The plugin supports running Clojure code snippets via sci (Small Clojure Interpreter), allowing you to execute ClojureScript code directly in your notes:
138138

139139
```clojure
140140
(defn factorial [n]
@@ -145,7 +145,7 @@ The plugin supports running Clojure code snippets via SCI (Small Clojure Interpr
145145
(factorial 5)
146146
```
147147

148-
SCI provides a safe, sandboxed environment for executing Clojure code with most of the core ClojureScript functionality available.
148+
sci provides a safe, sandboxed environment for executing Clojure code with most of the core ClojureScript functionality available.
149149

150150
## Development
151151

icon.svg

Lines changed: 14 additions & 0 deletions
Loading

logo.png

-1020 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"logseq": {
2121
"id": "logseq-runit-plugin",
2222
"title": "logseq-runit-plugin",
23-
"icon": "./logo.png",
23+
"icon": "./icon.svg",
2424
"main": "dist/index.html"
2525
},
2626
"devDependencies": {

0 commit comments

Comments
 (0)