Skip to content

chore: update .gitattributes file #322

chore: update .gitattributes file

chore: update .gitattributes file #322

name: Conventional Commit
on:
workflow_dispatch:
push:
branches: [main, '+.x', next, next-major, beta, alpha]
pull_request:
branches: [main, '+.x', next, next-major, beta, alpha]
permissions: {}
jobs:
commit-check:
name: Commit check
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read
steps:
- name: Harden runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
github.com:443
api.github.com:443
registry.npmjs.org:443
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
fetch-depth: 0 # Required by commitlint
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: lts/jod
cache: npm
cache-dependency-path: .github/semantic-release/package-lock.json
- name: Install commitlint
working-directory: .github/semantic-release/
run: npm clean-install
- name: Validate current commit (last commit) with commitlint
if: ${{ github.event_name != 'pull_request' }}
working-directory: .github/semantic-release/
run: npx --no-install commitlint --verbose --last
- name: Validate PR commits with commitlint
if: ${{ github.event_name == 'pull_request' }}
working-directory: .github/semantic-release/
run: |
npx --no-install commitlint --verbose \
--from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \
--to ${{ github.event.pull_request.head.sha }}