Skip to content

Commit 6806cf1

Browse files
Kyome22claude
andcommitted
Add release workflow and document npm installation
Mirror the lobsterjs setup so tag pushes (`*.*.*`) build the package and create a GitHub Release with `dist/lobster-wiki.js` attached. README now also documents the `npm install @hacknock/lobster-wiki` path alongside the CDN usage shown in Quick Start. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent aa9d538 commit 6806cf1

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: "24.13.1"
20+
cache: "npm"
21+
22+
- run: npm install -g npm@^11.10.0
23+
24+
- run: npm ci
25+
26+
- run: npm run build
27+
28+
- uses: softprops/action-gh-release@v3
29+
with:
30+
generate_release_notes: true
31+
files: |
32+
dist/lobster-wiki.js

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,23 @@ Write a minimal `index.html`:
6262

6363
Write your content pages in `content/` and serve with any static file server.
6464

65+
## Installation
66+
67+
### CDN
68+
69+
The latest build is available via GitHub Pages — see the `import` URL in the Quick Start above. Or download `lobster-wiki.js` from the [releases page](https://github.com/Hacknock/lobster-wiki/releases) and host it yourself.
70+
71+
### npm
72+
73+
```sh
74+
npm install @hacknock/lobster-wiki
75+
```
76+
77+
```ts
78+
import { initWiki } from "@hacknock/lobster-wiki";
79+
initWiki("./wiki.config.json");
80+
```
81+
6582
## Features
6683

6784
- **SPA routing**`?page=slug` query parameters with browser history support

0 commit comments

Comments
 (0)