# Release

> Create a new versioned release with changelog, PHAR build, and GitHub release

- Skill: `phel-lang/release` (Agent Skill)
- Install (CLI): `npx skillmds@latest add phel-lang/release`
- Raw SKILL.md: https://api.skillmd.com/api/skills/phel-lang/release/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: phel-lang (https://skillmd.com/u/phel-lang)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/phel-lang/release

---


# Release

## Context

!`git branch --show-current`
!`git status --porcelain`
!`grep "LATEST_VERSION = " src/php/Shared/VersionFinder.php`

## Instructions

### Phase 1: Pre-flight Checks

1. Abort if not on `main` or if there are uncommitted changes (see context above).

2. **Check CHANGELOG.md has Unreleased content**:
   ```bash
   git diff $(git describe --tags --abbrev=0)..HEAD -- CHANGELOG.md
   ```
   Warn if `## Unreleased` section is empty.

3. **Determine next version**:
   - If `$ARGUMENTS` provides a version, validate format (X.Y.Z)
   - Otherwise, auto-increment minor: `0.29.0` → `0.30.0`

### Phase 2: Release

4. **If `--dry-run`**, show what would happen and stop:
   ```bash
   ./tools/release.sh --dry-run <version>
   ```

5. **Run the release script**:
   ```bash
   ./tools/release.sh <version>
   ```

   The script handles: version bump, changelog update, commit, PHAR build, git tag, push, GitHub release with PHAR attachment.

### Phase 3: Verify

6. **Confirm release was created**:
   ```bash
   gh release view v<version>
   ```

7. **Report the release URL** to the user.

## Reference

- Full guide: `.github/RELEASE.md`
- Release script: `tools/release.sh`
- Version file: `src/php/Shared/VersionFinder.php`

