1- name : Release @next-eval/core to npm
1+ name : Release to npm
22
33on :
44 push :
55 branches : [main]
6- paths :
7- - ' packages/core/**'
8- - ' .github/workflows/release-core.yml'
96
107jobs :
118 check-version :
@@ -21,16 +18,17 @@ jobs:
2118
2219 - name : Check if version changed
2320 id : check
21+ working-directory : packages/next-eval
2422 run : |
2523 # Get current version from package.json
26- CURRENT_VERSION=$(node -p "require('./packages/core/ package.json').version")
24+ CURRENT_VERSION=$(node -p "require('./package.json').version")
2725
2826 # Get previous version from package.json in the previous commit
29- git checkout HEAD~1 -- packages/core/ package.json 2>/dev/null || echo "No previous commit"
30- PREVIOUS_VERSION=$(node -p "require('./packages/core/ package.json').version" 2>/dev/null || echo "0.0.0")
27+ git checkout HEAD~1 -- package.json 2>/dev/null || echo "No previous commit"
28+ PREVIOUS_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0")
3129
3230 # Reset to current version
33- git checkout HEAD -- packages/core/ package.json
31+ git checkout HEAD -- package.json
3432
3533 echo "Previous version: $PREVIOUS_VERSION"
3634 echo "Current version: $CURRENT_VERSION"
@@ -61,53 +59,58 @@ jobs:
6159 - name : Install dependencies
6260 run : bun install --frozen-lockfile
6361
64- - name : Run type checks
65- run : bun run check-types
66- working-directory : packages/core
67-
68- - name : Run lint
69- run : bun run lint
70- working-directory : packages/core
62+ - name : Run tests
63+ run : bun test
7164
7265 - name : Build package
7366 run : bun run build
74- working-directory : packages/core
67+ working-directory : packages/next-eval
7568
7669 - name : Setup npm registry
7770 run : |
7871 echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
7972 echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
8073
8174 - name : Publish to npm
82- run : npm publish --access restricted
83- working-directory : packages/core
75+ run : npm publish --access public
76+ working-directory : packages/next-eval
8477 env :
8578 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
8679
8780 - name : Create GitHub release
88- uses : actions/create-release@v1
89- env :
90- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81+ uses : softprops/action-gh-release@v2
9182 with :
9283 tag_name : v${{ needs.check-version.outputs.version }}
93- release_name : Release v${{ needs.check-version.outputs.version }}
84+ name : Release v${{ needs.check-version.outputs.version }}
85+ token : ${{ secrets.GITHUB_TOKEN }}
9486 body : |
9587 ## Changes
9688
97- Release of @ next-eval/core v ${{ needs.check-version.outputs.version }}
89+ Auto-generated release for @wordbricks/ next-eval version ${{ needs.check-version.outputs.version }}
9890
99- ### Installation (Private Package)
91+ ### Installation
10092
10193 ```bash
102- npm install @next-eval/core
94+ npm install @wordbricks/next-eval@latest
95+ # or
96+ bun add @wordbricks/next-eval@latest
97+ # or
98+ yarn add @wordbricks/next-eval@latest
10399 ```
104100
105101 ### Usage
106102
107103 ```typescript
108- import { runMDR } from '@next-eval/core/script/runMDR';
109- import { PROMPTS } from '@next-eval/core/constant';
110- import { replaceMultipleSpaces } from '@next-eval/core/utils/stringUtils';
104+ import { HTMLProcessor, evaluateExtractions } from '@wordbricks/next-eval';
105+
106+ // Process HTML
107+ const processor = new HTMLProcessor(html);
108+ const { slimHtml, hierarchicalJson, flatJson } = processor.process();
109+
110+ // Evaluate extractions
111+ const results = evaluateExtractions(groundTruth, predictions);
111112 ```
113+
114+ For more details, see the [documentation](https://github.com/wordbricks/next-eval).
112115 draft : false
113116 prerelease : false
0 commit comments