harness-auto-docs 0.2.2 → 0.3.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.
@@ -24,6 +24,11 @@ jobs:
24
24
  - name: Install dependencies
25
25
  run: pnpm install --frozen-lockfile
26
26
 
27
+ - name: Set version from tag
28
+ run: node -e "const pkg=require('./package.json');pkg.version='${TAG#v}';require('fs').writeFileSync('package.json',JSON.stringify(pkg,null,2)+'\n');console.log('Version set to',pkg.version)" && echo "VERSION=${TAG#v}" >> $GITHUB_ENV
29
+ env:
30
+ TAG: ${{ github.ref_name }}
31
+
27
32
  - name: Build
28
33
  run: pnpm build
29
34
 
@@ -34,3 +39,23 @@ jobs:
34
39
  run: pnpm publish --no-git-checks
35
40
  env:
36
41
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42
+
43
+ update-docs:
44
+ runs-on: ubuntu-latest
45
+ needs: publish # Wait for npm publish so npx@latest uses the new version
46
+
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ with:
50
+ fetch-depth: 0 # Required: fetch all tags for diff
51
+
52
+ - uses: actions/setup-node@v4
53
+ with:
54
+ node-version: '20'
55
+
56
+ - name: Generate and PR Harness Engineering docs
57
+ run: npx harness-auto-docs@latest
58
+ env:
59
+ AI_MODEL: ${{ vars.AI_MODEL || 'MiniMax-Text-01' }}
60
+ AI_API_KEY: ${{ secrets.AI_API_KEY }}
61
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-auto-docs",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "Auto-generate Harness Engineering docs on git tag",
5
5
  "type": "module",
6
6
  "bin": {