Skip to content

fix: use kebab case function for comparison so /how-to route works (#… #680

fix: use kebab case function for comparison so /how-to route works (#…

fix: use kebab case function for comparison so /how-to route works (#… #680

Workflow file for this run

name: build
on:
push:
branches: ["*"]
pull_request:
branches: [main]
workflow_dispatch:
env:
SLACK_BOT_TOKEN: ${{secrets.SLACK_BOT_TOKEN}}
jobs:
notify_start:
runs-on: ubuntu-latest
steps:
- name: Notify CI channel start
uses: voxmedia/github-action-slack-notify-build@v1
if: env.SLACK_BOT_TOKEN != ''
with:
channel: ci
color: "#3278BD"
status: STARTED
build:
runs-on: ${{matrix.os}}
needs: [notify_start]
strategy:
matrix:
os:
- ubuntu-latest
node:
- 19.6
steps:
- uses: actions/checkout@v2
- name: Setup node ${{matrix.node}}
uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- name: npm install
run: npm install
- name: npm run format:check
run: npm run format:check
- name: npm run lint
run: npm run lint
- name: npm run build
run: npm run build
- name: npm run test
run: npm run test -- --verbose
release:
name: semantic-release
runs-on: ubuntu-latest
needs: [build]
if: success() && github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install semantic-release
run: npm i -g semantic-release
- name: Release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: npx semantic-release
notify_success:
runs-on: ubuntu-latest
needs: [build]
if: success()
steps:
- uses: voxmedia/github-action-slack-notify-build@v1
if: env.SLACK_BOT_TOKEN != ''
with:
channel: ci
color: good
status: SUCCESS
notify_failure:
runs-on: ubuntu-latest
needs: [build]
if: failure()
steps:
- uses: voxmedia/github-action-slack-notify-build@v1
if: env.SLACK_BOT_TOKEN != ''
with:
channel: ci
color: danger
status: FAILED