Skip to content

chore(deps): update commitlint to v18 (major) #459

chore(deps): update commitlint to v18 (major)

chore(deps): update commitlint to v18 (major) #459

Workflow file for this run

name: CI
on:
push:
branches-ignore:
- "gh-pages"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo "commits_count_incr=$(($COUNT+1))" >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' }}
env:
COUNT: ${{ github.event.pull_request.commits }}
- uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request' }}
with:
fetch-depth: ${{ env.commits_count_incr }}
- uses: actions/checkout@v3
if: ${{ github.event_name != 'pull_request' }}
- id: nvm
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
- uses: actions/setup-node@v2-beta
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install --no-optional --no-audit --no-fund --progress=false
# Test Git hooks in CI, to make sure script upgrades do not break them.
- run: npm run prepare
# Test commit message validation in CI.
- run: git log -1 --pretty=%B >> latest.log && ./.git/hooks/commit-msg latest.log
- run: npm run test:ci
- run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
if: ${{ github.event_name == 'pull_request' }}
- run: npx danger ci --verbose
if: ${{ github.event_name == 'pull_request' }}
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm run report:package
- run: npx semantic-release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}