mirror of
https://github.com/conorluddy/ios-simulator-skill.git
synced 2026-09-14 20:07:12 +08:00
63d8ef2312
Documents the new scripts that landed since the last doc pass: appearance.py, location.py, model_inspector.py, container.py, localization_audit.py, sim_list.py, simulator_selector.py. - CLAUDE.md: script count 21/27 → 29; add Device State (2) and Simulator Discovery (2) categories; reorganise Testing & Analysis (6 → 9). - SKILL.md: full 29-script listing with renumbered Lifecycle scripts (23-29). - marketplace.json, plugin.json: description bumped to 29. - validate-version.yml: fix SKILL.md path after directory restructure. - .gitignore: fix local config.json path to match new directory layout.
71 lines
2.6 KiB
YAML
71 lines
2.6 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/skills/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
|