Skip to content

feat: initialize with mdformat-plugin-template #1

feat: initialize with mdformat-plugin-template

feat: initialize with mdformat-plugin-template #1

Workflow file for this run

---
name: CI
"on":
push:
branches: [main]
tags: [v*]
pull_request: null
jobs:
prek:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- uses: j178/prek-action@v1
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.14"]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v5
- name: Install uv and Python
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
- name: Install Package
run: uv pip install ".[test]"
- name: Run pytest
run: pytest --cov
prek-hook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install uv and Python
uses: astral-sh/setup-uv@v7
with:
python-version: 3.14
activate-environment: true
- name: Install prek
uses: j178/prek-action@v1
with:
install-only: true
- name: Install Package
run: uv pip install ".[test]"
- name: run prek with plugin
run: prek run --config .pre-commit-test.yaml --all-files --verbose --show-diff-on-failure
publish:
name: Publish to PyPi
needs: [prek, tests, prek-hook]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mdformat-mdformat-mdsf
permissions:
contents: write # For GitHub release creation
id-token: write # IMPORTANT: mandatory for PyPI trusted publishing
steps:
- uses: actions/checkout@v5
- name: Install uv and Python
uses: astral-sh/setup-uv@v7
with:
python-version: 3.14
- name: Build Package
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Generate GitHub Release Notes
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true