Files
conorluddy__ios-simulator-s…/.github/workflows/validate-version.yml
Conor b43bb74b23 Fix broken CI workflows and stale documentation (#24)
* Fix broken CI workflows and stale documentation

All three GitHub Actions workflows referenced skill/ — a directory that
no longer exists. The actual code lives in ios-simulator-skill/. CI has
been silently non-functional since the directory was renamed.

- Fix lint.yml, release.yml, validate-version.yml paths
- Fix pyproject.toml ruff include paths
- Update CLAUDE.md project structure to reflect actual layout
- Update DEV.md stats (21+ scripts, ~10k lines) and all path refs
- Remove stale SPECIFICATION.md (historical v1.0 planning doc)
- Remove examples/ check from release.yml (dir doesn't exist)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix pre-existing ruff lint error in cache_utils.py

Add maxsplit=1 to str.split() call (PLC0207). This error was hidden
because CI previously pointed at nonexistent skill/ directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:48:12 +00:00

71 lines
2.5 KiB
YAML

name: Validate Version
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to validate (e.g., v1.0.0)'
required: true
type: string
jobs:
validate:
name: Validate version consistency
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract version from tag or input
id: version
run: |
if [ "${{ github.event_name }}" = "release" ]; then
VERSION="${{ github.ref_name }}"
else
VERSION="${{ inputs.version }}"
fi
# Remove 'v' prefix if present
VERSION_NUMBER="${VERSION#v}"
echo "tag=$VERSION" >> $GITHUB_OUTPUT
echo "number=$VERSION_NUMBER" >> $GITHUB_OUTPUT
echo "📌 Validating version: $VERSION (number: $VERSION_NUMBER)"
- name: Check pyproject.toml version
run: |
PYPROJECT_VERSION=$(grep -E '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "pyproject.toml version: $PYPROJECT_VERSION"
echo "Release version: ${{ steps.version.outputs.number }}"
if [ "$PYPROJECT_VERSION" != "${{ steps.version.outputs.number }}" ]; then
echo "❌ ERROR: Version mismatch!"
echo " pyproject.toml: $PYPROJECT_VERSION"
echo " Release tag: ${{ steps.version.outputs.number }}"
exit 1
fi
echo "✅ pyproject.toml version matches"
- name: Check SKILL.md for version reference
run: |
if ! grep -q "${{ steps.version.outputs.number }}" ios-simulator-skill/SKILL.md; then
echo "⚠️ WARNING: Version ${{ steps.version.outputs.number }} not mentioned in SKILL.md"
echo "Consider adding version info to the SKILL.md frontmatter or description"
else
echo "✅ SKILL.md mentions version ${{ steps.version.outputs.number }}"
fi
- name: Validation summary
if: success()
run: |
echo "## ✅ Version Validation Passed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Release Version:** ${{ steps.version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "All version references are consistent:" >> $GITHUB_STEP_SUMMARY
echo "- ✅ pyproject.toml: ${{ steps.version.outputs.number }}" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Git tag: ${{ steps.version.outputs.tag }}" >> $GITHUB_STEP_SUMMARY