Freenet Release Skill
Overview
This skill orchestrates a complete Freenet release. It determines the next version, shows what's changed since the last release, confirms with the user, and runs the automated release pipeline.
Arguments
- If an argument is provided (e.g.,
/release 0.1.133), use that as the target version - If no argument is provided, auto-detect the next patch version
Step 1: Determine Current State
Run these commands to gather release context:
# Get current version from Cargo.toml
grep "^version" crates/core/Cargo.toml | cut -d'"' -f2
# Get the last release tag
git describe --tags --abbrev=0
# Get commits since last release
git log --oneline $(git describe --tags --abbrev=0)..HEAD
Auto-version logic: If no version argument was provided, increment the patch version of the current version (e.g., 0.1.132 -> 0.1.133).
Step 2: Show Changelog and Confirm
Present the user with:
- Current version and target version
- Commits since last release (categorized by conventional commit type)
- fdev version that will be auto-incremented
Then ask the user to confirm before proceeding.
Step 3: Pre-flight Checks
Before running the release script, verify:
# Must be on main branch
git branch --show-current # Should be "main"
# Must have clean working directory
git status --porcelain # Should be empty
# Must be up to date with origin
git fetch origin main
git rev-parse HEAD # Compare with:
git rev-parse origin/main
If any check fails, inform the user and stop.
Step 4: Run the Release
Execute the release script:
./scripts/release.sh --version <VERSION>
The script handles the entire pipeline:
- Version bump - Updates
crates/core/Cargo.tomlandcrates/fdev/Cargo.toml - Release PR - Creates a branch, commits, pushes, opens PR with auto-merge
- Wait for CI - Monitors GitHub CI on the release PR (up to 30 min)
- Publish crates - Publishes
freenetthenfdevto crates.io - GitHub Release - Creates tag, generates release notes, creates release
- Cross-compile - Triggered automatically by the tag push
- Announcements - Matrix and River notifications (if tools available)
Important Options
--skip-tests- Skip local pre-release tests (CI still runs on the PR)--dry-run- Show what would be done without executing--deploy-local- Deploy to local gateway after release--deploy-remote- Deploy to remote gateways after release
Resumability
The release script is resumable. If it fails partway through, re-running with the same --version will auto-detect completed steps and skip them. State is saved to /tmp/release-<VERSION>.state.
Step 5: Post-Release Verification
After the release completes, verify:
# Check crates.io publication
cargo search freenet --limit 1
# Check GitHub release exists
gh release view v<VERSION>
# Check cross-compile workflow started
gh run list --workflow=cross-compile.yml --limit 1
Step 6: Post-Release Log Review
IMPORTANT: Wait 10-15 minutes for gateways to auto-update, then check logs:
# Check gateway logs for errors
ssh freenet@nova.locut.us 'freenet --version && tail -100 ~/.local/state/freenet/freenet.$(date +%Y-%m-%d).log | grep -iE "error|warn" | tail -10'
ssh freenet@vega.locut.us 'freenet --version && tail -100 ~/.local/state/freenet/freenet.$(date +%Y-%m-%d).log | grep -iE "error|warn" | tail -10'
ssh ian@technic 'freenet --version && tail -100 ~/.local/state/freenet/freenet.$(date +%Y-%m-%d).log | grep -iE "error|warn" | tail -10'
Look for: log spam, rapid log growth, new error patterns.
Rollback
If a release needs to be rolled back:
./scripts/release-rollback.sh --version <VERSION>
# Add --yank-crates to also yank from crates.io (irreversible!)
Version Scheme
- freenet:
0.1.X- patch incremented each release - fdev:
0.3.X- patch auto-incremented by release script (independent versioning)
