doc-survival-kit 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -223,6 +223,35 @@ start index.html # Windows
|
|
|
223
223
|
|
|
224
224
|
---
|
|
225
225
|
|
|
226
|
+
## Publishing to npm
|
|
227
|
+
|
|
228
|
+
Publishing is fully automated via **GitHub Actions** and **npm Trusted Publishing** (OIDC). No npm token is needed — GitHub and npm authenticate directly via OpenID Connect.
|
|
229
|
+
|
|
230
|
+
### How it works
|
|
231
|
+
|
|
232
|
+
A GitHub Actions workflow (`.github/workflows/publish.yml`) is triggered whenever a version tag (`v*`) is pushed. It checks out the code, installs Node.js, and runs `npm publish --provenance`. The `--provenance` flag generates a signed attestation proving the package was built from this repository.
|
|
233
|
+
|
|
234
|
+
### Releasing a new version
|
|
235
|
+
|
|
236
|
+
The project uses [just](https://github.com/casey/just) as a command runner. To publish a new version:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
just publish patch # 4.0.0 → 4.0.1
|
|
240
|
+
just publish minor # 4.0.0 → 4.1.0
|
|
241
|
+
just publish major # 4.0.0 → 5.0.0
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
This bumps the version in `package.json`, creates a git tag, and pushes everything. The GitHub Actions workflow takes it from there.
|
|
245
|
+
|
|
246
|
+
### Initial setup (already done)
|
|
247
|
+
|
|
248
|
+
For reference, here is what was configured once:
|
|
249
|
+
|
|
250
|
+
1. **npm side** — on npmjs.com → package Settings → Trusted Publisher → GitHub Actions: repository owner `ymedaghri`, repository name `doc-survival-kit`, workflow filename `publish.yml`.
|
|
251
|
+
2. **GitHub side** — the workflow file `.github/workflows/publish.yml` with `permissions: id-token: write` to enable OIDC authentication.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
226
255
|
## Tech stack
|
|
227
256
|
|
|
228
257
|
| Technology | Detail |
|
|
@@ -233,6 +262,8 @@ start index.html # Windows
|
|
|
233
262
|
| Local storage | Browser `localStorage` |
|
|
234
263
|
| File storage | File System Access API (`showDirectoryPicker`) |
|
|
235
264
|
| Handle persistence | `IndexedDB` — file handle is remembered across sessions |
|
|
265
|
+
| Publishing | npm Trusted Publishing via GitHub Actions (OIDC) |
|
|
266
|
+
| Task runner | [just](https://github.com/casey/just) |
|
|
236
267
|
|
|
237
268
|
---
|
|
238
269
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-survival-kit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Dashboard personnel offline : diagrammes, tâches, notes et liens dans un seul fichier HTML — fonctionne sans serveur via file://",
|
|
5
5
|
"bin": {
|
|
6
6
|
"doc-survival-kit": "./bin/cli.js"
|