@jordancoin/notioncli 1.2.1 → 1.3.1
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/.github/workflows/publish.yml +74 -0
- package/README.md +118 -420
- package/TECHNICAL.md +185 -0
- package/bin/notion.js +18 -1611
- package/commands/blocks.js +142 -0
- package/commands/comments.js +59 -0
- package/commands/config.js +328 -0
- package/commands/crud.js +196 -0
- package/commands/database.js +241 -0
- package/commands/import-export.js +162 -0
- package/commands/pages.js +203 -0
- package/commands/query.js +73 -0
- package/commands/search.js +45 -0
- package/commands/upload.js +84 -0
- package/commands/users.js +73 -0
- package/lib/config.js +68 -0
- package/lib/context.js +359 -0
- package/lib/filters.js +257 -0
- package/lib/format.js +258 -0
- package/lib/helpers.js +13 -334
- package/lib/markdown.js +488 -0
- package/lib/paginate.js +74 -0
- package/lib/retry.js +76 -0
- package/package.json +1 -1
- package/skill/SKILL.md +51 -10
- package/skill/marketplace.json +2 -2
- package/test/unit.test.js +662 -0
- package/test/debug-parent.js +0 -32
- package/test/live-relations-test.js +0 -309
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump:
|
|
7
|
+
description: 'Version bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
publish:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: 22
|
|
30
|
+
registry-url: https://registry.npmjs.org
|
|
31
|
+
|
|
32
|
+
- run: npm ci
|
|
33
|
+
|
|
34
|
+
- name: Run tests
|
|
35
|
+
run: npm test
|
|
36
|
+
|
|
37
|
+
- name: Configure git
|
|
38
|
+
run: |
|
|
39
|
+
git config user.name "github-actions[bot]"
|
|
40
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
41
|
+
|
|
42
|
+
- name: Bump version
|
|
43
|
+
id: bump
|
|
44
|
+
run: |
|
|
45
|
+
# Bump package.json (no git tag yet)
|
|
46
|
+
NEW_VERSION=$(npm version ${{ inputs.bump }} --no-git-tag-version)
|
|
47
|
+
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
|
|
48
|
+
echo "version_bare=${NEW_VERSION#v}" >> "$GITHUB_OUTPUT"
|
|
49
|
+
|
|
50
|
+
- name: Update version in bin/notion.js
|
|
51
|
+
run: |
|
|
52
|
+
sed -i "s/\.version('[^']*')/\.version('${{ steps.bump.outputs.version_bare }}')/" bin/notion.js
|
|
53
|
+
|
|
54
|
+
- name: Update version in skill/marketplace.json
|
|
55
|
+
run: |
|
|
56
|
+
sed -i 's/"version": "[^"]*"/"version": "${{ steps.bump.outputs.version_bare }}"/' skill/marketplace.json
|
|
57
|
+
|
|
58
|
+
- name: Commit, tag, push
|
|
59
|
+
run: |
|
|
60
|
+
git add -A
|
|
61
|
+
git commit -m "chore: bump version to ${{ steps.bump.outputs.version_bare }}"
|
|
62
|
+
git tag ${{ steps.bump.outputs.version }}
|
|
63
|
+
git push origin main --tags
|
|
64
|
+
|
|
65
|
+
- name: Create GitHub Release
|
|
66
|
+
env:
|
|
67
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
68
|
+
run: |
|
|
69
|
+
gh release create ${{ steps.bump.outputs.version }} \
|
|
70
|
+
--title "${{ steps.bump.outputs.version }}" \
|
|
71
|
+
--generate-notes
|
|
72
|
+
|
|
73
|
+
- name: Publish to npm (OIDC trusted publisher — no token needed)
|
|
74
|
+
run: npm publish --access public --provenance
|