chore(deps): lock file maintenance #192
Workflow file for this run
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: Main | |
on: | |
pull_request: | |
branches: | |
- main | |
- next | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
# ============================================================================ | |
# Install | |
# ============================================================================ | |
install: | |
name: Install | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile | |
# ============================================================================ | |
# Lint & Format | |
# ============================================================================ | |
lint: | |
name: Lint | |
needs: install | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile --prefer-offline | |
- name: Run linter | |
run: | | |
pnpm run lint.check | |
# ============================================================================ | |
# Typecheck | |
# ============================================================================ | |
typecheck: | |
name: Typecheck | |
needs: install | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile --prefer-offline | |
- name: Check types | |
run: | | |
pnpm run type.check | |
# ============================================================================ | |
# Build | |
# ============================================================================ | |
build: | |
name: Build | |
needs: [lint, typecheck] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile --prefer-offline | |
- name: Run build | |
run: | | |
pnpm run build | |
# ============================================================================ | |
# Release | |
# ============================================================================ | |
release: | |
name: Release | |
needs: [build] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
strategy: | |
matrix: | |
node: [22] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile --prefer-offline | |
- name: Create Release PR or Release | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm changeset tag | |
commit: '[ci]: release' | |
title: '[ci] release' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |