openspec-playwright 0.1.16 → 0.1.20

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.
@@ -27,11 +27,51 @@ jobs:
27
27
  - name: Build
28
28
  run: npm run build
29
29
 
30
+ - name: Set version from tag
31
+ run: |
32
+ TAG_NAME="${GITHUB_REF#refs/tags/}"
33
+ VERSION="${TAG_NAME#v}"
34
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
35
+ node -e "
36
+ import {readFileSync, writeFileSync} from 'fs';
37
+ const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
38
+ pkg.version = '$VERSION';
39
+ writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
40
+ "
41
+
42
+ - name: Generate release notes
43
+ id: release-notes
44
+ run: |
45
+ TAG_NAME="${GITHUB_REF#refs/tags/}"
46
+ # Get all tags sorted by version, find previous tag
47
+ PREV_TAG=$(git tag --sort=-v:refname | sed -n '2p')
48
+ if [ -n "$PREV_TAG" ]; then
49
+ CHANGES=$(git log "$PREV_TAG..HEAD" --oneline --format="- %s")
50
+ else
51
+ CHANGES=$(git log --oneline --format="- %s" -10)
52
+ fi
53
+ COMPARE_URL="https://github.com/${{ github.repository }}/compare/${PREV_TAG}...${TAG_NAME}"
54
+ if [ -z "$PREV_TAG" ]; then
55
+ COMPARE_URL="https://github.com/${{ github.repository }}/releases/tag/${TAG_NAME}"
56
+ fi
57
+ cat << NOTES > release-notes.md
58
+ ## What's Changed
59
+
60
+ ${CHANGES}
61
+
62
+ **Full Changelog**: ${COMPARE_URL}
63
+ NOTES
64
+ echo "body_path=release-notes.md" >> "$GITHUB_OUTPUT"
65
+
66
+ - name: Package for release
67
+ run: |
68
+ npm pack --pack-destination .
69
+
30
70
  - name: Create GitHub Release
31
71
  uses: softprops/action-gh-release@v2
32
72
  with:
33
- generate_release_notes: true
34
- files: dist/**/*
73
+ body_path: ${{ steps.release-notes.outputs.body_path }}
74
+ files: "*.tgz"
35
75
  env:
36
76
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37
77
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspec-playwright",
3
- "version": "0.1.16",
3
+ "version": "0.1.20",
4
4
  "description": "OpenSpec + Playwright E2E verification setup tool for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,5 @@
1
+ ## What's Changed
2
+
3
+ - ci: set version from tag before npm pack/publish
4
+
5
+ **Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.20