fix(deps): patch vite and unhead security advisories (#52) #148
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| strategy: | |
| matrix: | |
| node-version: [20.x, 22.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@d648c2dd069001a242c621c8306af467f150e99d | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build all packages | |
| run: pnpm run build | |
| - name: Run type check | |
| run: pnpm run type-check | |
| - name: Run linting | |
| run: pnpm run lint | |
| - name: Run tests | |
| run: pnpm run test | |
| - name: Check packages can be packed | |
| run: pnpm -r exec npm pack --dry-run | |
| build-check: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@d648c2dd069001a242c621c8306af467f150e99d | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: | | |
| packages/*/dist/ | |
| packages/*/package.json | |
| retention-days: 7 | |
| changeset-check: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@d648c2dd069001a242c621c8306af467f150e99d | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Check for changeset | |
| run: | | |
| # Check if there are any changesets | |
| if [ -d ".changeset" ] && [ "$(ls -A .changeset/*.md 2>/dev/null | wc -l)" -gt 0 ]; then | |
| echo "✅ Changeset found" | |
| exit 0 | |
| fi | |
| # Check if any package files were changed | |
| if git diff --name-only origin/main...HEAD | grep -E '^packages/.+\.(ts|tsx|js|jsx|json)$' | grep -v test | grep -v spec; then | |
| echo "❌ Package files changed but no changeset found" | |
| echo "Please add a changeset by running: pnpm changeset" | |
| echo "" | |
| echo "Changed package files:" | |
| git diff --name-only origin/main...HEAD | grep -E '^packages/.+\.(ts|tsx|js|jsx|json)$' | grep -v test | grep -v spec | |
| exit 1 | |
| else | |
| echo "✅ No package files changed, changeset not required" | |
| exit 0 | |
| fi |