Skip to content

v2.5.0: changelog badge reports validation state, action publishes it #12

v2.5.0: changelog badge reports validation state, action publishes it

v2.5.0: changelog badge reports validation state, action publishes it #12

Workflow file for this run

# CI for patchnotes — which dogfoods patchnotes.
# The changelog job uses the bundled action (uses: ./) installed from the
# checked-out source (version: "."), so every PR proves the action works.
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install . pytest
- run: pytest tests/ -q
changelog:
name: Validate own changelog (dogfood)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# patchnotes validating patchnotes, via its own action, from source
- uses: ./
with:
file: CHANGELOG.md
strict: "true"
check-version: pyproject.toml
version: "."
sarif:
name: Upload changelog SARIF to code scanning
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install .
- name: Generate SARIF
run: patchnotes CHANGELOG.md --format sarif validate > results.sarif || true
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif