chore: update readme.md #10
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: CI/CD | |
on: | |
push: | |
paths: | |
- "packages/**" | |
- "turbo.json" | |
- "package.json" | |
branches: | |
- main | |
- next | |
permissions: | |
contents: read # checkout | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: "latest" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run lint:lib | |
- run: pnpm run test:lib | |
CD: | |
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' }} | |
runs-on: ubuntu-latest | |
needs: [CI] | |
permissions: | |
contents: write # publish github release | |
issues: write # comment on released issues | |
pull-requests: write # comment on PR | |
id-token: write # OIDC | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run build:lib | |
- name: Release | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: pnpm run release:lib |