docs: update README with table of contents and package metadata #27
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: Release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project (CJS + ESM) | |
| run: npm run build | |
| - name: Run unit tests | |
| run: npm test | |
| - name: Run ESM integration tests | |
| run: npm run test:esm | |
| - name: Verify package integrity before release | |
| run: | | |
| echo "Verifying package structure..." | |
| test -d build/cjs || (echo "❌ CJS build missing" && exit 1) | |
| test -d build/esm || (echo "❌ ESM build missing" && exit 1) | |
| test -f build/esm/package.json || (echo "❌ ESM package.json missing" && exit 1) | |
| grep -q '"type".*"module"' build/esm/package.json || (echo "❌ ESM type marker missing" && exit 1) | |
| echo "✅ Package structure verified" | |
| - name: Semantic Release | |
| run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |