Skip to content

chore(deps): update commitlint monorepo to v17.8.1 #271

chore(deps): update commitlint monorepo to v17.8.1

chore(deps): update commitlint monorepo to v17.8.1 #271

Workflow file for this run

name: CI & Release
on:
# Build on pushes to release branches
push:
branches: []
# Build on pull requests targeting release branches
pull_request:
branches: []
workflow_dispatch:
inputs:
release:
description: Release new version
required: true
default: false
type: boolean
jobs:
build:
name: Lint & Build
runs-on: ubuntu-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run lint --if-present
- run: npm run prepublishOnly
test:
name: Test
needs: build
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
node: [lts/*, current]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm test --if-present
release:
name: Semantic release
needs: test
runs-on: ubuntu-latest
# only run if opt-in during workflow_dispatch
if: inputs.release == true
steps:
- uses: actions/checkout@v3
with:
# Need to fetch entire commit history to
# analyze every commit since last release
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
- run: npm ci
# Branches that will release new versions are defined in .releaserc.json
- run: npx semantic-release
# Don't allow interrupting the release step if the job is cancelled, as it can lead to an inconsistent state
# e.g. git tags were pushed but it exited before `npm publish`
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}