Skip to content

Commit 64f955e

Browse files
committed
chore: Update README and CI workflows for improved documentation and testing
- Added a project logo to the README for enhanced visual appeal. - Removed outdated testing section from README and added a new "Star History" section. - Updated CI workflows to include linting, type checking, and testing steps for better code quality assurance. - Enhanced the release workflow to ensure accurate version tagging and changelog extraction. These changes improve project documentation and streamline the CI process, ensuring higher code quality and better user engagement.
1 parent 91b7d6f commit 64f955e

File tree

4 files changed

+62
-40
lines changed

4 files changed

+62
-40
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,32 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
1214
steps:
13-
- uses: actions/checkout@v4
14-
- uses: pnpm/action-setup@v4
15-
- uses: actions/setup-node@v4
15+
- name: Checkout repository
16+
uses: actions/checkout@v6
17+
18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
1623
with:
1724
node-version: '22'
1825
cache: 'pnpm'
26+
1927
- name: Install dependencies
2028
run: pnpm install --frozen-lockfile
29+
30+
- name: Lint
31+
run: pnpm lint
32+
33+
- name: Type check
34+
run: pnpm type-check
35+
2136
- name: Build
2237
run: pnpm build
38+
39+
- name: Test
40+
run: pnpm test

.github/workflows/release.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,6 @@ on:
5757
required: false
5858
type: string
5959

60-
# YAML anchors for reusable configurations
61-
x-common-setup: &common-setup
62-
- name: Checkout repository
63-
uses: actions/checkout@v6
64-
with:
65-
fetch-depth: 0 # Full history for changelog generation
66-
- name: Setup pnpm
67-
uses: pnpm/action-setup@v4
68-
- name: Setup Node.js
69-
uses: actions/setup-node@v4
70-
with:
71-
node-version: '22'
72-
cache: 'pnpm'
73-
- name: Install dependencies
74-
run: pnpm install --frozen-lockfile
75-
7660
jobs:
7761
release:
7862
runs-on: ubuntu-latest
@@ -101,6 +85,15 @@ jobs:
10185
- name: Install dependencies
10286
run: pnpm install --frozen-lockfile
10387

88+
- name: Lint
89+
run: pnpm lint
90+
91+
- name: Type check
92+
run: pnpm type-check
93+
94+
- name: Test
95+
run: pnpm test
96+
10497
- name: Build CLI package
10598
working-directory: packages/opennextjs-cli
10699
run: pnpm build
@@ -245,14 +238,16 @@ jobs:
245238
# Read from package-specific CHANGELOG.md files
246239
echo "📝 Extracting changelog sections for release notes..."
247240
241+
VERSION="${{ steps.version.outputs.VERSION }}"
242+
248243
# Start with version header
249-
echo "## [$TAG_VERSION] - $(date +%Y-%m-%d)" > /tmp/changelog-section.md
244+
echo "## [$VERSION] - $(date +%Y-%m-%d)" > /tmp/changelog-section.md
250245
echo "" >> /tmp/changelog-section.md
251246
252247
# Extract CLI section from packages/opennextjs-cli/CHANGELOG.md
253248
if [ -f "packages/opennextjs-cli/CHANGELOG.md" ]; then
254249
# Find the version section in CLI changelog
255-
CLI_SECTION=$(awk "/^## \[$TAG_VERSION\]/,/^## \[|^<!-- generated/" "packages/opennextjs-cli/CHANGELOG.md" | head -n -1 || true)
250+
CLI_SECTION=$(awk "/^## \[$VERSION\]/,/^## \[|^<!-- generated/" "packages/opennextjs-cli/CHANGELOG.md" | head -n -1 || true)
256251
if [ -n "$CLI_SECTION" ]; then
257252
echo "### @jsonbored/opennextjs-cli" >> /tmp/changelog-section.md
258253
echo "" >> /tmp/changelog-section.md
@@ -265,7 +260,7 @@ jobs:
265260
# Extract MCP section from packages/opennextjs-mcp/CHANGELOG.md
266261
if [ -f "packages/opennextjs-mcp/CHANGELOG.md" ]; then
267262
# Find the version section in MCP changelog
268-
MCP_SECTION=$(awk "/^## \[$TAG_VERSION\]/,/^## \[|^<!-- generated/" "packages/opennextjs-mcp/CHANGELOG.md" | head -n -1 || true)
263+
MCP_SECTION=$(awk "/^## \[$VERSION\]/,/^## \[|^<!-- generated/" "packages/opennextjs-mcp/CHANGELOG.md" | head -n -1 || true)
269264
if [ -n "$MCP_SECTION" ]; then
270265
echo "### @jsonbored/opennextjs-mcp" >> /tmp/changelog-section.md
271266
echo "" >> /tmp/changelog-section.md
@@ -355,7 +350,7 @@ jobs:
355350
- name: Create GitHub Release
356351
uses: softprops/action-gh-release@v2
357352
with:
358-
tag_name: ${{ github.ref_name }}
353+
tag_name: ${{ steps.version.outputs.TAG }}
359354
name: Release ${{ steps.version.outputs.VERSION }}
360355
body: |
361356
## Packages Released

.github/workflows/version-bump.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ jobs:
9797
steps:
9898
<<: *common-setup
9999

100+
- name: Lint
101+
run: pnpm lint
102+
103+
- name: Type check
104+
run: pnpm type-check
105+
106+
- name: Test
107+
run: pnpm test
108+
100109
- name: Get last tag
101110
id: last_tag
102111
run: |
@@ -275,8 +284,11 @@ jobs:
275284
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
276285
echo "✅ Updated both packages to version $NEW_VERSION"
277286
278-
- <<: *git-config
287+
- name: Configure git
279288
if: steps.changes.outputs.HAS_CHANGES == 'true' && steps.version_calc.outputs.SKIP_RELEASE != 'true'
289+
run: |
290+
git config user.name "github-actions[bot]"
291+
git config user.email "github-actions[bot]@users.noreply.github.com"
280292
281293
- name: Commit and tag
282294
if: steps.changes.outputs.HAS_CHANGES == 'true' && steps.version_calc.outputs.SKIP_RELEASE != 'true' && steps.changelog.outputs.CHANGELOG_UPDATED == 'true'

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![opennextjs-cli](https://socialify.git.ci/JSONbored/opennextjs-cli/image?custom_description=Interactive+CLI+%2B+MCP+for+OpenNext.js+on+Cloudflare.&description=1&font=Source+Code+Pro&forks=1&issues=1&logo=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F180226629%3Fs%3D200%26v%3D4&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Dark)
2+
13
# OpenNext.js CLI
24

35
<div align="center">
@@ -263,17 +265,6 @@ The CLI supports multiple caching strategies:
263265
| `r2-do-queue` | ISR with time-based revalidation | Dynamic content with ISR |
264266
| `r2-do-queue-tag-cache` | Full-featured with on-demand revalidation | Complex apps with on-demand ISR |
265267

266-
## Testing
267-
268-
- **CLI Package**: 162 tests (9 test suites)
269-
- Unit tests for all utilities
270-
- E2E tests for all commands
271-
- **MCP Package**: 28 tests (5 test suites)
272-
- Server initialization tests
273-
- Tool and resource tests
274-
275-
**All tests use real file system operations** (no mocks).
276-
277268
## Roadmap
278269

279270
**Completed:**
@@ -317,10 +308,6 @@ pnpm dev
317308
- **[Cloudflare Workers](https://workers.cloudflare.com/)** - Deployment platform
318309
- **[Model Context Protocol](https://modelcontextprotocol.io/)** - MCP specification
319310

320-
## License
321-
322-
MIT License - see [LICENSE](LICENSE) file for details.
323-
324311
## Support
325312

326313
- [Documentation](https://github.com/JSONbored/opennextjs-cli#readme)
@@ -337,9 +324,19 @@ This tool is built for and powered by [OpenNext.js](https://opennext.js.org/), a
337324

338325
---
339326

327+
## Star History
328+
329+
<div align="center">
330+
331+
[![Star History Chart](https://api.star-history.com/svg?repos=jsonbored/opennext-cli&type=date&legend=top-left)](https://www.star-history.com/#jsonbored/opennext-cli&type=date&legend=top-left)
332+
333+
</div>
334+
335+
---
336+
340337
<div align="center">
341338

342-
Made with ❤️ by [JSONbored](https://github.com/JSONbored)
339+
Made with 💜 by [JSONbored](https://github.com/JSONbored)
343340

344341
[⭐ Star on GitHub](https://github.com/JSONbored/opennextjs-cli)[📦 npm CLI](https://www.npmjs.com/package/@jsonbored/opennextjs-cli)[📦 npm MCP](https://www.npmjs.com/package/@jsonbored/opennextjs-mcp)[🐛 Report Issue](https://github.com/JSONbored/opennextjs-cli/issues)
345342

0 commit comments

Comments
 (0)