Skip to content

Add Minecraft version 1.21.11 to plugins list #34

Add Minecraft version 1.21.11 to plugins list

Add Minecraft version 1.21.11 to plugins list #34

name: Generate Markdown and JSON
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "data/plugins-and-themes.yml"
- "scripts/generate.py"
- "scripts/validate-yml.py"
- "scripts/yml-to-json.py"
- ".github/workflows/generate-markdown-json.yml"
permissions:
contents: write
concurrency:
group: generate-markdown-json-${{ github.ref }}
cancel-in-progress: true
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml
- name: Validate YAML file
run: python scripts/validate-yml.py
- name: Generate Markdown files
run: python scripts/generate.py
- name: Convert YAML to JSON
run: python scripts/yml-to-json.py
- name: Show generated changes
run: |
git status --short
git diff --stat -- PLUGINS.md THEMES.md README.md generated/json/plugins-and-themes.json || true
- name: Commit and push generated files
env:
BRANCH_NAME: ${{ github.ref_name }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add PLUGINS.md THEMES.md README.md generated/json/plugins-and-themes.json
if git diff --cached --quiet; then
echo "No generated changes to commit."
exit 0
fi
git commit -m "Update generated markdown and JSON"
git push origin "HEAD:${BRANCH_NAME}"