mirror of
https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill.git
synced 2026-09-14 13:59:59 +08:00
df7b8b8cc2
Adds the Codex plugin manifest with listing metadata for the six-skill bundle, renders PNG logos from the SVG (marketplace surfaces cannot use SVGs), switches the Cursor and OpenAI wrappers to the PNG, bumps the release workflow to version all manifests including .codex-plugin, and restructures the README around the primary install paths with the remaining clients moved to INSTALLATION.md.
94 lines
3.1 KiB
YAML
94 lines
3.1 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
|
|
for manifest in plugin.json .claude-plugin/plugin.json .codex-plugin/plugin.json .cursor-plugin/plugin.json; do
|
|
jq --arg version "$VERSION" '.version = $version' "$manifest" > "$manifest.tmp"
|
|
mv "$manifest.tmp" "$manifest"
|
|
done
|
|
sed -i -E "s/^version: \".*\"$/version: \"$VERSION\"/" agents/openai.yaml
|
|
|
|
- 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
|
|
version_files="plugin.json .claude-plugin/plugin.json .claude-plugin/marketplace.json .codex-plugin/plugin.json .cursor-plugin/plugin.json agents/openai.yaml"
|
|
if git diff --quiet $version_files; then
|
|
echo "Version already set to $VERSION. Skipping commit."
|
|
exit 0
|
|
fi
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add $version_files
|
|
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
|