openspec-playwright 0.1.16 → 0.1.21
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/release.yml +42 -2
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/openspec-playwright-0.1.21.tgz +0 -0
- package/package.json +1 -1
- package/release-notes.md +5 -0
|
@@ -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
|
-
|
|
34
|
-
files:
|
|
73
|
+
body_path: ${{ steps.release-notes.outputs.body_path }}
|
|
74
|
+
files: "*.tgz"
|
|
35
75
|
env:
|
|
36
76
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
37
77
|
|
package/README.md
CHANGED
package/README.zh-CN.md
CHANGED
|
Binary file
|
package/package.json
CHANGED