Skip to content

feat(ci): adds more CI validations, introduces semantic release (#74) #41

feat(ci): adds more CI validations, introduces semantic release (#74)

feat(ci): adds more CI validations, introduces semantic release (#74) #41

Workflow file for this run

name: Commit Lint
on:
- push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
HUSKY: 0
jobs:
duplicate-check:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
commit-lint:
if: needs.duplicate-check.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate commits with commitlint
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "Checking commits in PR"
npx commitlint --from ${{ github.event.pull_request.base.sha }}~1 --to ${{ github.event.pull_request.head.sha }} --verbose
elif [ "${{ github.event_name }}" == "push" ]; then
echo "Checking commits in push"
npx commitlint --from ${{ github.event.before }} --to ${{ github.event.after }} --verbose
fi