meta: switch to semantic-release #105
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow ensures markdown files follow our style guide | |
# Logic: | |
# 1. Runs on every PR | |
# 2. Uses our local npm scripts for consistency | |
# 3. Attempts to auto-fix issues and commits them on PRs | |
# 4. Runs all markdown-related checks (lint, spell-check) | |
name: Markdown Lint | |
on: | |
pull_request: | |
paths: | |
- '**/*.md' | |
jobs: | |
check-and-fix: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- run: npm ci | |
# Run format check first since it's quick | |
- name: Check formatting | |
run: npm run format:check | |
# Run markdown fixes and checks | |
- name: Fix and check markdown | |
run: | | |
npm run fix:md | |
npm run spell-check | |
# Only commit fixes on PRs | |
- name: Commit fixes | |
if: github.event_name == 'pull_request' | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: 'fix: auto-fix markdown formatting' | |
file_pattern: '**/*.md' |