mirror of
https://github.com/TemujinCalidius/SurvivorCore.git
synced 2026-08-14 00:58:01 +00:00
ci.yml (push to main/dev + all PRs): rokit install, then stylua --check, selene, luau-lsp analyze (against a Rojo sourcemap + Roblox type defs), and build both default.project.json and demo.project.json. Least-privilege permissions + concurrency cancel-in-progress, mirroring FediHome. changelog.yml: require CHANGELOG.md in a PR's files unless skip-changelog. release.yml: add discussions: write + discussion_category_name: Announcements so each tagged release cross-posts to Discussions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
name: Changelog
|
|
|
|
# Require every PR to update CHANGELOG.md (under "## Unreleased"), unless it
|
|
# carries the "skip-changelog" label. Keeps the changelog in lockstep with the code.
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled, unlabeled]
|
|
|
|
# Least-privilege token — read the repo + the PR's file list.
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
changelog:
|
|
name: CHANGELOG updated
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Require a CHANGELOG.md entry (unless 'skip-changelog' label)
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }}
|
|
REPO: ${{ github.repository }}
|
|
PR: ${{ github.event.pull_request.number }}
|
|
run: |
|
|
if printf ',%s,' "$LABELS" | grep -q ',skip-changelog,'; then
|
|
echo "skip-changelog label present — no changelog entry required."
|
|
exit 0
|
|
fi
|
|
files=$(gh api --paginate "repos/$REPO/pulls/$PR/files" --jq '.[].filename')
|
|
if printf '%s\n' "$files" | grep -qx 'CHANGELOG.md'; then
|
|
echo "✓ CHANGELOG.md updated."
|
|
else
|
|
echo "::error::This PR doesn't update CHANGELOG.md. Add an entry under '## Unreleased', or apply the 'skip-changelog' label if no entry is warranted."
|
|
exit 1
|
|
fi
|