docs(zod): adds zx.fold usage with z.clone example to README
#979
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: Publish | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check project | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| run: npm i -g corepack@latest && corepack enable | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: production=true pnpm run build | |
| - name: Check | |
| run: pnpm run check && pnpm run test:cov | |
| # - name: Coverage | |
| # uses: coverallsapp/github-action@v2 | |
| # env: | |
| # NODE_COVERALLS_DEBUG: 1 | |
| # with: | |
| # allow-empty: true | |
| # github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pack | |
| run: production=true pnpm run build:dist | |
| preview: | |
| name: Continuous Release | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Check project | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| run: npm i -g corepack@latest && corepack enable | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: production=true pnpm build | |
| - name: Check | |
| run: pnpm check && pnpm test:cov | |
| - name: Pack | |
| run: production=true pnpm build:dist | |
| - name: Preview | |
| run: npx pkg-pr-new publish './packages/*' | |
| release: | |
| name: Release Packages | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| permissions: | |
| contents: write | |
| packages: write | |
| pull-requests: write | |
| id-token: write | |
| pages: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| run: npm i -g corepack@latest && corepack enable | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: production=true pnpm run build | |
| - name: Check | |
| run: pnpm run check && pnpm run test | |
| - name: Pack | |
| run: production=true pnpm run build:dist | |
| - name: Build docs | |
| run: | | |
| set -euo pipefail | |
| pnpm run ci:docs | |
| - name: Upload GitHub pages artifact | |
| id: upload-documentation | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "docs/" | |
| - name: Deploy to GitHub pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Create PR or publish | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm run ci:version | |
| publish: pnpm run ci:publish | |
| commit: 'chore: publish package(s)' | |
| title: 'chore: publish package(s)' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |