1.7 KiB
1.7 KiB
Release — Shared Workflow
Tags a sub-project with a CalVer version and pushes to trigger CI/CD. The calling skill MUST define a Config section with the values listed under "Required Config".
Required Config
| Key | Description |
|---|---|
BASEDIR |
Absolute path to the project root (e.g., /mnt/NV2/Development/paper-dynasty) |
SERVICE_MAPPING |
Table: short name → local directory → Docker image (if applicable) |
DEPLOY_COMMANDS |
Per-environment deploy commands (optional — listed in the calling skill) |
Usage
/release <service> [version]
- service: A short name from the SERVICE_MAPPING table
- version: CalVer tag (e.g.,
2026.3.42),dev, or omitted to auto-increment
What It Does
- Validates the service name against SERVICE_MAPPING
- Checks repo state (must be on
main, clean working tree) - Pulls latest
mainvia fast-forward - Determines version:
- Omitted: auto-generates next CalVer (
YYYY.M.BUILD) - Explicit: validates CalVer format, checks tag doesn't exist
dev: force-updates thedevtag
- Omitted: auto-generates next CalVer (
- Creates the git tag (or force-updates
dev) - Pushes the tag to origin — triggers CI/CD pipeline
Environments
- CalVer tags (e.g.,
2026.3.6) → production Docker tags devtag → dev environment Docker tags
After Releasing
If DEPLOY_COMMANDS are defined in the calling skill's config, show them to the user. Do not auto-execute deploy commands — always confirm first.
Script
The calling skill should provide a release.sh that calls the shared script:
bash ~/.claude/skills/_templates/release-core.sh --config <path-to-config> <service> [version]