Skip to content

ci: add semantic-release #2

ci: add semantic-release

ci: add semantic-release #2

name: Validate PR title
on:
pull_request:
types: [opened, edited, synchronize, reopened]
env:
node_version: ${{ vars.NODE_VERSION }}
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node_version }}
cache: npm
- name: Validate PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
npm install -D @commitlint/[email protected] @commitlint/[email protected]
# Configure commitlint to use conventional config.
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
echo $PR_TITLE | npx commitlint --verbose