feat(docs): overhaul documentation and branding #1
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
| # @format | |
| name: CI/CD Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # Trigger on tags like v1.0.0, v0.0.1, etc. | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' # Align with project's Node.js version | |
| cache: 'npm' # Cache npm dependencies | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project | |
| run: npm run build | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: dist-build | |
| path: dist/ | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build # This job depends on the build job | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run tests | |
| run: node tests/run-cli.js # Use the custom test runner | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: test # This job depends on the test job | |
| permissions: | |
| contents: write # Required to create a GitHub release | |
| packages: write # Required to publish to GitHub Packages (if used) | |
| id-token: write # Required for OIDC authentication with npm (if used) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| registry-url: 'https://registry.npmjs.org/' # Specify npm registry | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v3 | |
| with: | |
| name: dist-build | |
| path: dist/ | |
| - name: Publish to npm | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # npm token for authentication |