chore: fix publish workflow #5
This file contains 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 | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
paths-ignore: | |
- README.md | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- README.md | |
jobs: | |
format-and-lint: | |
name: Format and Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Check Format | |
run: pnpm format:fail | |
- name: Lint | |
run: pnpm lint | |
test: | |
name: Test | |
needs: format-and-lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Test | |
run: pnpm test |