Skip to content

feat: add unified GitHub Pages site template #7

feat: add unified GitHub Pages site template

feat: add unified GitHub Pages site template #7

Workflow file for this run

name: Release
on:
push:
branches: [main]
paths-ignore:
- "*.md"
- "docs/**"
- "standards/**"
- "LICENSE"
- ".github/release-drafter.yml"
permissions:
contents: write
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
name: Create release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest tag
id: tag
run: |
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "current=$TAG" >> "$GITHUB_OUTPUT"
- name: Determine version bump
id: bump
run: |
CURRENT="${{ steps.tag.outputs.current }}"
CURRENT="${CURRENT#v}"
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
COMMITS=$(git log "${{ steps.tag.outputs.current }}..HEAD" --pretty=format:"%s" 2>/dev/null || git log --pretty=format:"%s")
if echo "$COMMITS" | grep -qE "^feat!:|BREAKING CHANGE"; then
MAJOR=$((MAJOR + 1))
MINOR=0
PATCH=0
elif echo "$COMMITS" | grep -qE "^feat(\(.*\))?:"; then
MINOR=$((MINOR + 1))
PATCH=0
else
PATCH=$((PATCH + 1))
fi
NEW="$MAJOR.$MINOR.$PATCH"
echo "version=$NEW" >> "$GITHUB_OUTPUT"
echo "tag=v$NEW" >> "$GITHUB_OUTPUT"
- name: Create tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "${{ steps.bump.outputs.tag }}" -m "Release ${{ steps.bump.outputs.tag }}"
git push origin "${{ steps.bump.outputs.tag }}"
- name: Create GitHub Release
run: |
gh release create "${{ steps.bump.outputs.tag }}" \
--title "${{ steps.bump.outputs.tag }}" \
--generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# About section sync requires a PAT with repo scope.
# Run manually after registry changes:
# python3 -c "import json; d=json.load(open('registry.json')); t=len(d); s=sum(x['skills'] for x in d); r=sum(x['rules'] for x in d); m=sum(x['mcpTools'] for x in d); print(f'{t} tools, {s} skills, {r} rules, {m} MCP tools')"
# gh repo edit TMHSDigital/Developer-Tools-Directory --description "Centralized catalog, standards, and scaffolding for <N> TMHSDigital developer tools - <S> skills, <R> rules, <M> MCP tools"