docs: update readme #33
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: [master] | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: {} # reset | |
| jobs: | |
| test: | |
| name: π§ͺ Test & Quality Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v4 | |
| - name: π’ Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: π¦ Install dependencies | |
| run: bun install | |
| - name: π§ͺ Run tests | |
| run: bun test | |
| - name: π Run linting and formatting checks | |
| run: bun run check | |
| - name: ποΈ Test build | |
| run: bun run build | |
| - name: π Upload coverage reports | |
| if: success() | |
| run: echo "β All quality checks passed" | |
| release: | |
| # IMPORTANT: prevent this action from running on forks | |
| if: github.repository == 'MarcelOlsen/mini-react' | |
| permissions: | |
| contents: write # to create release (changesets/action) | |
| pull-requests: write # to create pull request (changesets/action) | |
| name: π Release | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: π’ Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: π¦ Install dependencies | |
| run: bun install | |
| - name: ποΈ Build package | |
| run: bun run build | |
| - name: π Create Release Pull Request or Publish to NPM | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: bunx changeset publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |