trilium-api 1.0.0 → 1.0.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.
@@ -1,37 +1,37 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main, master]
6
- pull_request:
7
- branches: [main, master]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [18, 20, 22]
16
-
17
- steps:
18
- - name: Checkout repository
19
- uses: actions/checkout@v4
20
-
21
- - name: Install pnpm
22
- uses: pnpm/action-setup@v4
23
-
24
- - name: Setup Node.js ${{ matrix.node-version }}
25
- uses: actions/setup-node@v4
26
- with:
27
- node-version: ${{ matrix.node-version }}
28
- cache: 'pnpm'
29
-
30
- - name: Install dependencies
31
- run: pnpm install
32
-
33
- - name: Type check
34
- run: pnpm test:ts
35
-
36
- - name: Run tests
37
- run: pnpm test:run
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ node-version: [18, 20, 22]
16
+
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Install pnpm
22
+ uses: pnpm/action-setup@v4
23
+
24
+ - name: Setup Node.js ${{ matrix.node-version }}
25
+ uses: actions/setup-node@v4
26
+ with:
27
+ node-version: ${{ matrix.node-version }}
28
+ cache: 'pnpm'
29
+
30
+ - name: Install dependencies
31
+ run: pnpm install
32
+
33
+ - name: Type check
34
+ run: pnpm test:ts
35
+
36
+ - name: Run tests
37
+ run: pnpm test:run
@@ -1,86 +1,84 @@
1
- name: Publish to npm
2
-
3
- on:
4
- workflow_dispatch:
5
- inputs:
6
- version:
7
- description: 'Version bump type'
8
- required: true
9
- default: 'patch'
10
- type: choice
11
- options:
12
- - patch
13
- - minor
14
- - major
15
- force:
16
- description: 'Force publish (overwrite existing version)'
17
- required: false
18
- default: false
19
- type: boolean
20
-
21
- jobs:
22
- publish:
23
- runs-on: ubuntu-latest
24
-
25
- permissions:
26
- contents: write
27
- id-token: write # Required for npm trusted publishing (OIDC)
28
-
29
- steps:
30
- - name: Checkout repository
31
- uses: actions/checkout@v4
32
- with:
33
- fetch-depth: 0
34
- token: ${{ secrets.GITHUB_TOKEN }}
35
-
36
- - name: Configure Git
37
- run: |
38
- git config user.name "github-actions[bot]"
39
- git config user.email "github-actions[bot]@users.noreply.github.com"
40
-
41
- - name: Install pnpm
42
- uses: pnpm/action-setup@v4
43
-
44
- - name: Setup Node.js
45
- uses: actions/setup-node@v4
46
- with:
47
- node-version: 20
48
- cache: 'pnpm'
49
- registry-url: 'https://registry.npmjs.org'
50
-
51
- - name: Install dependencies
52
- run: pnpm install
53
-
54
- - name: Type check
55
- run: pnpm test:ts
56
-
57
- - name: Run tests
58
- run: pnpm test:run
59
-
60
- - name: Bump version
61
- id: version
62
- run: |
63
- pnpm version ${{ inputs.version }} --no-git-tag-version
64
- VERSION=$(node -p "require('./package.json').version")
65
- echo "version=$VERSION" >> $GITHUB_OUTPUT
66
-
67
- - name: Commit and tag
68
- run: |
69
- git add package.json
70
- git commit -m "chore: release v${{ steps.version.outputs.version }}"
71
- git tag "v${{ steps.version.outputs.version }}"
72
- git push && git push --tags
73
-
74
- - name: Build
75
- run: pnpm build
76
-
77
- - name: Publish to npm
78
- run: pnpm publish --access public --no-git-checks ${{ inputs.force && '--force' || '' }}
79
- # Uses OIDC trusted publishing - no NPM_TOKEN needed
80
-
81
- - name: Create GitHub Release
82
- uses: softprops/action-gh-release@v2
83
- with:
84
- tag_name: v${{ steps.version.outputs.version }}
85
- name: v${{ steps.version.outputs.version }}
86
- generate_release_notes: true
1
+ name: Publish to npm
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: 'Version bump type'
8
+ required: true
9
+ default: 'patch'
10
+ type: choice
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
+
16
+ jobs:
17
+ publish:
18
+ runs-on: ubuntu-latest
19
+
20
+ permissions:
21
+ contents: write
22
+ id-token: write # Required for npm trusted publishing (OIDC)
23
+
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v4
27
+ with:
28
+ fetch-depth: 0
29
+ token: ${{ secrets.GITHUB_TOKEN }}
30
+
31
+ - name: Configure Git
32
+ run: |
33
+ git config user.name "github-actions[bot]"
34
+ git config user.email "github-actions[bot]@users.noreply.github.com"
35
+
36
+ - name: Install pnpm
37
+ uses: pnpm/action-setup@v4
38
+
39
+ - name: Setup Node.js
40
+ uses: actions/setup-node@v4
41
+ with:
42
+ node-version: 22
43
+ cache: 'pnpm'
44
+ registry-url: 'https://registry.npmjs.org'
45
+
46
+ - name: Update npm to latest
47
+ run: npm install -g npm@latest
48
+
49
+ - name: Install dependencies
50
+ run: pnpm install
51
+
52
+ - name: Type check
53
+ run: pnpm test:ts
54
+
55
+ - name: Run tests
56
+ run: pnpm test:run
57
+
58
+ - name: Bump version
59
+ id: version
60
+ run: |
61
+ pnpm version ${{ inputs.version }} --no-git-tag-version
62
+ VERSION=$(node -p "require('./package.json').version")
63
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
64
+
65
+ - name: Commit and tag
66
+ run: |
67
+ git add package.json
68
+ git commit -m "chore: release v${{ steps.version.outputs.version }}"
69
+ git tag "v${{ steps.version.outputs.version }}"
70
+ git push && git push --tags
71
+
72
+ - name: Build
73
+ run: pnpm build
74
+
75
+ - name: Publish to npm
76
+ run: npm publish --access public
77
+ # Uses OIDC trusted publishing - no NPM_TOKEN needed
78
+
79
+ - name: Create GitHub Release
80
+ uses: softprops/action-gh-release@v2
81
+ with:
82
+ tag_name: v${{ steps.version.outputs.version }}
83
+ name: v${{ steps.version.outputs.version }}
84
+ generate_release_notes: true