Skip to content

chore: improve ci/cd #36

chore: improve ci/cd

chore: improve ci/cd #36

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
commitlint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Print versions
run: |
git --version
node --version
pnpm --version
pnpm dlx commitlint --version
- name: Install commitlint
run: |
pnpm add conventional-changelog-conventionalcommits
pnpm add commitlint@latest
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: pnpm dlx commitlint --last --verbose
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: pnpm dlx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose