build(deps-dev): bump @typescript-eslint/parser from 6.21.0 to 8.52.0 #115
Workflow file for this run
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: Pre-Release Check | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| jobs: | |
| check: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run lint checks | |
| run: npm run lint | |
| - name: Run type checks | |
| run: npm run typecheck | |
| - name: Run tests | |
| run: npm test | |
| - name: Build application | |
| run: npm run build | |
| - name: Verify build output | |
| run: | | |
| echo "π¦ Verifying build output..." | |
| if [ ! -d "dist" ]; then | |
| echo "β Build directory 'dist' not found" | |
| exit 1 | |
| fi | |
| if [ ! -f "dist/main.js" ]; then | |
| echo "β Main entry point 'dist/main.js' not found" | |
| exit 1 | |
| fi | |
| echo "β Build output verified successfully" | |
| - name: Create distributable (dry-run) | |
| run: npm run dist | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Test package creation | |
| run: | | |
| echo "π¦ Testing package creation..." | |
| npm pack | |
| # Check package size | |
| PACKAGE_SIZE=$(ls -lh *.tgz | awk '{print $5}') | |
| echo "π Package size: $PACKAGE_SIZE" | |
| # Extract and verify package contents | |
| tar -tzf *.tgz | head -20 | |
| # Clean up | |
| rm *.tgz | |
| echo "β Package creation test passed" | |
| - name: Test global installation simulation | |
| run: | | |
| echo "π§ͺ Simulating global installation..." | |
| npm pack | |
| # Create a temporary directory for testing | |
| TEMP_DIR=$(mktemp -d) | |
| cd $TEMP_DIR | |
| # Install the package locally to test | |
| npm init -y > /dev/null | |
| npm install $GITHUB_WORKSPACE/*.tgz | |
| # Check if bin script exists and is executable | |
| if [ ! -f "node_modules/ccusage-widget/bin/ccusage-widget.js" ]; then | |
| echo "β Bin script not found in package" | |
| exit 1 | |
| fi | |
| # Clean up | |
| cd $GITHUB_WORKSPACE | |
| rm -rf $TEMP_DIR | |
| rm *.tgz | |
| echo "β Global installation simulation passed" | |
| - name: Check version consistency | |
| run: | | |
| echo "π Checking version consistency..." | |
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | |
| echo "π Current package version: $PACKAGE_VERSION" | |
| # Check if version follows semver | |
| if ! echo "$PACKAGE_VERSION" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+' > /dev/null; then | |
| echo "β Version does not follow semantic versioning" | |
| exit 1 | |
| fi | |
| echo "β Version format is valid" | |
| - name: Summary | |
| if: success() | |
| run: | | |
| echo "π All pre-release checks passed!" | |
| echo "β Lint checks" | |
| echo "β Type checks" | |
| echo "β Tests" | |
| echo "β Build verification" | |
| echo "β Package creation" | |
| echo "β Installation simulation" | |
| echo "β Version consistency" | |
| echo "" | |
| echo "π Ready for release when tagged!" |