diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 56577a9..64d9d42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,39 +2,39 @@ name: Build on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' + - name: Setup Node.js + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 + with: + node-version-file: ".nvmrc" + cache: "npm" - - name: Install dependencies - run: npm ci + - name: Install dependencies + run: npm ci - - name: Lint code - run: npm run lint + - name: Lint code + run: npm run lint - - name: Generate themes - run: npm run generate + - name: Generate themes + run: npm run generate - - name: Validate output - run: npm run validate + - name: Validate output + run: npm run validate - - name: Check for uncommitted changes - run: | - if ! git diff --quiet; then - echo "Generated files have uncommitted changes!" - git diff - exit 1 - fi + - name: Check for uncommitted changes + run: | + if ! git diff --quiet; then + echo "Generated files have uncommitted changes!" + git diff + exit 1 + fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e21915a..7f2b0aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,25 +2,22 @@ name: CI on: push: - branches: [ main, develop ] + branches: [main, develop] pull_request: - branches: [ main ] - -env: - NODE_VERSION: '22' + branches: [main] jobs: lint: name: Lint & Format Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci @@ -35,13 +32,13 @@ jobs: name: Generate Themes runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci @@ -66,13 +63,13 @@ jobs: name: Test Web Components runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci @@ -84,7 +81,7 @@ jobs: run: npm run test:e2e - name: Upload Playwright report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 if: always() with: name: playwright-report @@ -98,13 +95,13 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci @@ -130,33 +127,33 @@ jobs: name: Security Scan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - scan-type: 'fs' - scan-ref: '.' - format: 'sarif' - output: 'trivy-results.sarif' + scan-type: "fs" + scan-ref: "." + format: "sarif" + output: "trivy-results.sarif" - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v3 + uses: github/codeql-action/upload-sarif@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # v3.30.1 with: - sarif_file: 'trivy-results.sarif' + sarif_file: "trivy-results.sarif" build-stats: name: Build Statistics runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci diff --git a/.github/workflows/cli-verify.yml b/.github/workflows/cli-verify.yml index 38a5e84..3772c43 100644 --- a/.github/workflows/cli-verify.yml +++ b/.github/workflows/cli-verify.yml @@ -2,36 +2,36 @@ name: CLI Verify on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: cli-verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' + - name: Setup Node.js + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 + with: + node-version-file: ".nvmrc" + cache: "npm" - - name: Install dependencies - run: npm ci + - name: Install dependencies + run: npm ci - - name: Generate themes - run: npm run generate + - name: Generate themes + run: npm run generate - - name: Run installer - run: | - export HOME=$(mktemp -d) - ./cli/install.sh + - name: Run installer + run: | + export HOME=$(mktemp -d) + ./cli/install.sh - - name: Run verifier - run: | - export HOME=$(mktemp -d) - ./cli/install.sh - ENGINE=docker ./verify/verify.sh + - name: Run verifier + run: | + export HOME=$(mktemp -d) + ./cli/install.sh + ENGINE=docker ./verify/verify.sh diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 16b1a93..ab33697 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -2,25 +2,25 @@ name: Commitlint on: pull_request: - branches: [ main ] + branches: [main] jobs: commitlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' + - name: Setup Node.js + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 + with: + node-version-file: ".nvmrc" + cache: "npm" - - name: Install dependencies - run: npm ci + - name: Install dependencies + run: npm ci - - name: Lint commit messages - run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD --verbose + - name: Lint commit messages + run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD --verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb5cbb3..53f2501 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,23 +3,20 @@ name: Release on: push: tags: - - 'v*' - -env: - NODE_VERSION: '22' + - "v*" jobs: build: name: Build Release Assets runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci @@ -63,14 +60,14 @@ jobs: cd .. - name: Upload build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: release-archives path: dist/*.tar.gz retention-days: 30 - name: Upload checksums - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: checksums path: dist/checksums.txt @@ -85,13 +82,13 @@ jobs: os: [ubuntu-latest, macos-latest] variant: [dark-medium, light-medium] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install dependencies run: npm ci @@ -115,18 +112,18 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 - name: Download build artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 with: name: release-archives path: dist/ - name: Download checksums - uses: actions/download-artifact@v4 + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 with: name: checksums path: dist/ @@ -181,7 +178,7 @@ jobs: echo "All packages include 6 theme variants (dark/light × hard/medium/soft)." >> CHANGELOG.md - name: Create Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 with: files: | dist/*.tar.gz diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 618ede8..28f193f 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -2,39 +2,39 @@ name: Snapshots on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: snapshots: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' + - name: Setup Node.js + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 + with: + node-version-file: ".nvmrc" + cache: "npm" - - name: Install dependencies - run: npm ci + - name: Install dependencies + run: npm ci - - name: Install Playwright browsers - run: npx playwright install --with-deps + - name: Install Playwright browsers + run: npx playwright install --with-deps - - name: Generate themes - run: npm run generate + - name: Generate themes + run: npm run generate - - name: Run Playwright tests - run: npm run snapshots + - name: Run Playwright tests + run: npm run snapshots - - name: Upload snapshots - uses: actions/upload-artifact@v4 - if: failure() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + - name: Upload snapshots + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: failure() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30