Files
Antoine van der Lee cc642e0b52 Add Xcode build optimization skills, references, scripts, and plugin metadata
First versioned snapshot of the full skill repository including:
- Five installable agent skills under skills/
- Shared references, schemas, and helper scripts
- Plugin and marketplace metadata for Claude Code
- GitHub workflows for release and README sync
- Compilation caching as a recommended build setting
- Four deeper Swift compiler diagnostic flags for compilation analysis
- Fixed SWIFT_COMPILATION_MODE to use singlefile (actual build setting value)
2026-03-14 17:09:17 +01:00

90 lines
2.9 KiB
YAML

name: Release
on:
workflow_dispatch:
inputs:
version:
description: "Version to release (for example 1.0.1)"
required: true
type: string
permissions:
contents: write
jobs:
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
env:
VERSION: ${{ inputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate version input
run: |
set -euo pipefail
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid semver version: $VERSION"
exit 1
fi
- name: Fail if tag already exists
run: |
set -euo pipefail
if git rev-parse -q --verify "refs/tags/$VERSION" >/dev/null; then
echo "Tag $VERSION already exists."
exit 1
fi
- name: Fail if version is not newer
run: |
set -euo pipefail
latest_tag="$(git tag -l '[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | head -n 1)"
if [[ -z "$latest_tag" ]]; then
echo "No existing semver tags found. Proceeding."
exit 0
fi
greatest="$(printf '%s\n%s\n' "$latest_tag" "$VERSION" | sort -V | tail -n 1)"
if [[ "$greatest" != "$VERSION" || "$latest_tag" == "$VERSION" ]]; then
echo "Version $VERSION must be greater than $latest_tag."
exit 1
fi
- name: Bump plugin manifest version
run: |
set -euo pipefail
jq --arg version "$VERSION" '.version = $version' .claude-plugin/plugin.json > .claude-plugin/plugin.json.tmp
mv .claude-plugin/plugin.json.tmp .claude-plugin/plugin.json
- name: Bump marketplace version fields
run: |
set -euo pipefail
jq --arg version "$VERSION" '.version = $version | .plugins |= map(.version = $version)' .claude-plugin/marketplace.json > .claude-plugin/marketplace.json.tmp
mv .claude-plugin/marketplace.json.tmp .claude-plugin/marketplace.json
- name: Commit and push version bump
run: |
set -euo pipefail
if git diff --quiet .claude-plugin/plugin.json .claude-plugin/marketplace.json; then
echo "No version change detected."
exit 1
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .claude-plugin/plugin.json .claude-plugin/marketplace.json
git commit -m "Bump version to $VERSION"
git push
- name: Create tag and GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.version }}
generate_release_notes: true