diff --git a/.github/actions/setup-node-pnpm/README.md b/.github/actions/setup-node-pnpm/README.md deleted file mode 100644 index b180050..0000000 --- a/.github/actions/setup-node-pnpm/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Setup Node.js and pnpm Action - -A reusable composite action that consolidates Node.js and pnpm installation steps for the Vibe Dashboard project. - -## Features - -- ✅ Sets up Node.js with configurable version (defaults to LTS) -- ✅ Sets up pnpm using the project's configured version -- ✅ Optional pnpm store caching for faster builds -- ✅ Automatic dependency installation with configurable lockfile mode -- ✅ Environment variable handling for GitHub tokens - -## Usage - -```yaml -steps: - - name: Checkout code - uses: actions/checkout@v5 - - - name: Setup Node.js and pnpm - uses: ./.github/actions/setup-node-pnpm - with: - # Optional inputs - node-version: 'lts/*' # Default: 'lts/*' - enable-cache: true # Default: 'true' - frozen-lockfile: true # Default: 'true' -``` - -## Inputs - -| Input | Description | Required | Default | -|-------|-------------|----------|---------| -| `node-version` | Node.js version to install | No | `'lts/*'` | -| `enable-cache` | Enable pnpm store caching | No | `'true'` | -| `frozen-lockfile` | Use frozen lockfile for pnpm install | No | `'true'` | - -## What it does - -1. **Setup Node.js**: Installs the specified Node.js version -2. **Setup pnpm**: Installs pnpm using the project's configured version (from `packageManager` field) -3. **Cache pnpm store** (optional): Sets up caching for pnpm store to speed up subsequent runs -4. **Install dependencies**: Runs `pnpm install` with optional `--frozen-lockfile` flag - -## Examples - -### CI/CD with caching and frozen lockfile -```yaml -- name: Setup Node.js and pnpm - uses: ./.github/actions/setup-node-pnpm - with: - enable-cache: true - frozen-lockfile: true -``` - -### Deployment without strict lockfile requirements -```yaml -- name: Setup Node.js and pnpm - uses: ./.github/actions/setup-node-pnpm - with: - enable-cache: false - frozen-lockfile: false -``` - -### Custom Node.js version -```yaml -- name: Setup Node.js and pnpm - uses: ./.github/actions/setup-node-pnpm - with: - node-version: '20' - enable-cache: true - frozen-lockfile: true -``` \ No newline at end of file diff --git a/.github/actions/setup-node-pnpm/action.yml b/.github/actions/setup-node-pnpm/action.yml index 24c465b..e0e345e 100644 --- a/.github/actions/setup-node-pnpm/action.yml +++ b/.github/actions/setup-node-pnpm/action.yml @@ -1,50 +1,42 @@ -name: 'Setup Node.js and pnpm' -description: 'Reusable action to setup Node.js and pnpm with caching' - -inputs: - node-version: - description: 'Node.js version to install' - required: false - default: 'lts/*' - enable-cache: - description: 'Enable pnpm store caching' - required: false - default: 'true' - frozen-lockfile: - description: 'Use frozen lockfile for pnpm install' - required: false - default: 'true' +name: Setup Node and pnpm runs: - using: 'composite' + using: composite steps: - - name: Setup Node.js ${{ inputs.node-version }} - uses: actions/setup-node@v4 + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 with: - node-version: ${{ inputs.node-version }} + node-version: 'lts/*' + registry-url: 'https://registry.npmjs.org' + # see pnpm cache setting below env: GITHUB_TOKEN: ${{ github.token }} - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - name: Get pnpm store directory - if: inputs.enable-cache == 'true' + id: store shell: bash run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT - - name: Setup pnpm cache - if: inputs.enable-cache == 'true' + - name: Save and restore pnpm cache on main uses: actions/cache@v4 + if: ${{ github.ref_name == 'main' }} with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ${{ steps.store.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - - name: Install dependencies + - name: Restore pnpm cache on PR + uses: actions/cache/restore@v4 + if: ${{ github.ref_name != 'main' }} + with: + path: ${{ steps.store.outputs.STORE_PATH }} + key: | + ${{ runner.os }}-pnpm-store- + + - run: pnpm install --frozen-lockfile --ignore-scripts shell: bash - run: pnpm install${{ inputs.frozen-lockfile == 'true' && ' --frozen-lockfile' || '' }} env: - GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..6eea32f --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["github>Boshen/renovate"] +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 243991a..9471b7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,6 @@ jobs: - name: Setup Node.js and pnpm uses: ./.github/actions/setup-node-pnpm - with: - enable-cache: true - frozen-lockfile: true - name: Lint code run: pnpm lint diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index e2e8506..9c1e4a4 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -30,9 +30,6 @@ jobs: - name: Setup Node.js and pnpm uses: ./.github/actions/setup-node-pnpm - with: - enable-cache: false - frozen-lockfile: false - name: Run lint run: pnpm lint diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c94c027..cb5f37d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,9 +25,6 @@ jobs: - name: Setup Node.js and pnpm uses: ./.github/actions/setup-node-pnpm - with: - enable-cache: false - frozen-lockfile: false - name: Lint run: pnpm lint diff --git a/.github/workflows/update-rolldown-stats.yml b/.github/workflows/update-rolldown-stats.yml index b31b669..a5cefc3 100644 --- a/.github/workflows/update-rolldown-stats.yml +++ b/.github/workflows/update-rolldown-stats.yml @@ -12,41 +12,13 @@ permissions: jobs: update-stats: runs-on: ubuntu-latest - + steps: - name: Checkout code uses: actions/checkout@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - - name: Setup Node.js LTS - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - name: Setup pnpm cache - uses: actions/cache@v4 - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - name: Install dependencies - run: pnpm install --frozen-lockfile - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Node.js and pnpm + uses: ./.github/actions/setup-node-pnpm - name: Run rolldown stats collection run: pnpm rolldown:stats @@ -65,7 +37,7 @@ jobs: - name: Commit and push changes if: steps.git-check.outputs.changes == 'true' run: | - git config --local user.email "boshen@gmail.com" + git config --local user.email "1430279+Boshen@users.noreply.github.com" git config --local user.name "Boshen" git add rolldown-version-stats.json git commit -m "chore: update rolldown version stats" @@ -73,4 +45,4 @@ jobs: - name: No changes to commit if: steps.git-check.outputs.changes != 'true' - run: echo "No changes were detected in rolldown-version-stats.json, skipping commit." \ No newline at end of file + run: echo "No changes were detected in rolldown-version-stats.json, skipping commit." diff --git a/.github/copilot-instructions.md b/AGENTS.md similarity index 100% rename from .github/copilot-instructions.md rename to AGENTS.md diff --git a/rolldown-version-stats.json b/rolldown-version-stats.json index 3af9984..ba293c2 100644 --- a/rolldown-version-stats.json +++ b/rolldown-version-stats.json @@ -1,7 +1,7 @@ [ { "version": "7.1.0", - "timestamp": "2025-08-25T06:57:57.569Z", + "timestamp": "2025-08-25T08:11:09.480Z", "files": [ { "path": "assets/index-DD-rq4eS.css", @@ -9,13 +9,13 @@ "type": "css" }, { - "path": "assets/index-DmHmC5BH.js", - "size": 566655, + "path": "assets/index-DHQ9JvaV.js", + "size": 566790, "type": "js" }, { "path": "index.html", - "size": 506, + "size": 515, "type": "html" }, { @@ -24,27 +24,27 @@ "type": "other" } ], - "totalSize": 571470, + "totalSize": 571614, "totalGzipSize": 0, - "buildTime": 3326 + "buildTime": 3124 }, { "version": "7.1.1", - "timestamp": "2025-08-25T06:58:02.241Z", + "timestamp": "2025-08-25T08:11:14.374Z", "files": [ - { - "path": "assets/index-C3ViWK1P.js", - "size": 566643, - "type": "js" - }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, + { + "path": "assets/index-d2fkeavV.js", + "size": 566778, + "type": "js" + }, { "path": "index.html", - "size": 506, + "size": 515, "type": "html" }, { @@ -53,27 +53,27 @@ "type": "other" } ], - "totalSize": 571458, + "totalSize": 571602, "totalGzipSize": 0, - "buildTime": 2937 + "buildTime": 2938 }, { "version": "7.1.2", - "timestamp": "2025-08-25T06:58:06.497Z", + "timestamp": "2025-08-25T08:11:18.593Z", "files": [ - { - "path": "assets/index-C3ViWK1P.js", - "size": 566643, - "type": "js" - }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, + { + "path": "assets/index-d2fkeavV.js", + "size": 566778, + "type": "js" + }, { "path": "index.html", - "size": 506, + "size": 515, "type": "html" }, { @@ -82,27 +82,27 @@ "type": "other" } ], - "totalSize": 571458, + "totalSize": 571602, "totalGzipSize": 0, - "buildTime": 2927 + "buildTime": 2960 }, { "version": "7.1.3", - "timestamp": "2025-08-25T06:58:10.694Z", + "timestamp": "2025-08-25T08:11:22.780Z", "files": [ + { + "path": "assets/index-CC82Zq9Q.js", + "size": 565944, + "type": "js" + }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, - { - "path": "assets/index-KSGgoblA.js", - "size": 565809, - "type": "js" - }, { "path": "index.html", - "size": 506, + "size": 515, "type": "html" }, { @@ -111,27 +111,27 @@ "type": "other" } ], - "totalSize": 570624, + "totalSize": 570768, "totalGzipSize": 0, - "buildTime": 2886 + "buildTime": 2916 }, { "version": "7.1.4", - "timestamp": "2025-08-25T06:58:14.917Z", + "timestamp": "2025-08-25T08:11:28.863Z", "files": [ + { + "path": "assets/index-CC82Zq9Q.js", + "size": 565944, + "type": "js" + }, { "path": "assets/index-DD-rq4eS.css", "size": 2812, "type": "css" }, - { - "path": "assets/index-KSGgoblA.js", - "size": 565809, - "type": "js" - }, { "path": "index.html", - "size": 506, + "size": 515, "type": "html" }, { @@ -140,8 +140,8 @@ "type": "other" } ], - "totalSize": 570624, + "totalSize": 570768, "totalGzipSize": 0, - "buildTime": 2893 + "buildTime": 2898 } ] \ No newline at end of file