Skip to content

Add conventional commit and branch checks from snowballr-ci #97

Add conventional commit and branch checks from snowballr-ci

Add conventional commit and branch checks from snowballr-ci #97

Workflow file for this run

name: Linting
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
lint-api:
name: Linting the API definition
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Run protolint
uses: yoheimuta/action-protolint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
fail_on_error: true
protolint_flags: proto/*.proto
lint-md:
name: Linting Markdown
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Lint Markdown
uses: SE-UUlm/snowballr-ci/src/lint-md@v1
with:
markdownlint-config-path: markdownlint.json
source-branch: main
ignore-links: "https://github.com/SE-UUlm/snowballr-api/releases/tag/*,https://www.npmjs.com/package/snowballr-api"
ignore-paths: "docs/,patches/,proto/,AGENTS.md,CLAUDE.md"
check-version-consistency:
name: Check version consistency
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Check that CHANGELOG version matches package.json version
run: |
CHANGELOG_VERSION=$(grep -m 1 '## \[' CHANGELOG.md | sed 's/## \[\(.*\)\].*/\1/')
PACKAGE_VERSION=$(jq -r '.version' npm-package/package.json)
echo "CHANGELOG version: $CHANGELOG_VERSION"
echo "package.json version: $PACKAGE_VERSION"
if [ "$CHANGELOG_VERSION" != "$PACKAGE_VERSION" ]; then
echo "Error: version mismatch (CHANGELOG.md: $CHANGELOG_VERSION, package.json: $PACKAGE_VERSION)"
exit 1
fi