feat: custom state #990
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: Preview | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Enable Corepack | |
| run: | | |
| npm i -g corepack@latest | |
| corepack enable | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Publish to pkg.pr.new | |
| run: pnpx pkg-pr-new publish --compact './packages/*' --template './examples/*' | |
| validate: | |
| name: Validate Preview | |
| needs: [release] | |
| uses: ./.github/workflows/validate.yml | |
| with: | |
| preview: ${{ github.event.pull_request.number || github.sha }} |