| name | release |
| description | Use this skill when the user asks to create a release, cut a release, publish a new version, or perform release-related tasks for the envsense project.
This skill provides comprehensive guidance for the automated release process, including:
- Version bumping in Cargo.toml
- Pre-release verification (tests, formatting, linting)
- Monitoring the automated CI/CD pipeline
- Multi-platform binary builds (Linux x64/ARM64, macOS Universal)
- Cryptographic signing with cosign
- Release verification and troubleshooting
- Schema version considerations
The envsense project uses an automated workflow triggered by version changes on the main branch. This skill walks through the entire process from start to finish.
|
Release Skill
This skill guides you through creating a new release for the envsense project.
Release Process Overview
The envsense project uses an automated release workflow that is triggered
when:
- A version change is detected in
Cargo.toml on the main branch
- CI tests pass successfully
- No git tag exists yet for that version
Step-by-Step Release Instructions
Follow these steps to create a new release via pull request:
1. Verify Current State
Before starting a release, check:
- All tests pass locally:
cargo test --all
- Code is formatted:
cargo fmt --all -- --check
- Linting passes:
cargo clippy --all --locked -- -D warnings
- Prettier formatting passes:
npm run format:check
- Baseline validation:
./scripts/compare-baseline.sh
- You're up to date with
main branch
2. Determine Version Number
Follow semantic versioning:
- Patch (0.5.x): Bug fixes, minor changes, no breaking changes
- Minor (0.x.0): New features, functionality additions, backward compatible
- Major (x.0.0): Breaking changes (when 1.0+ is reached)
Check current version:
grep '^version = ' Cargo.toml | head -1
Check existing tags:
git tag --sort=-version:refname | head -10
3. Update Version in Cargo.toml
Edit the version field in Cargo.toml:
version = "0.5.1"
Important: This is a workspace project. Only update the root Cargo.toml
version field (line ~10).
4. Create Release Branch and PR
Create a release branch with your changes:
git checkout -b release-v0.5.1
git add Cargo.toml
git commit -m "Bump version to 0.5.1"
git push origin release-v0.5.1
5. Create Pull Request
Create a PR with a concise description of the release:
gh pr create --title "Release v0.5.1" --body "Bump version from 0.5.0 to 0.5.1 for patch release."
Or via GitHub UI with a structured description:
## Summary
Bump version from 0.5.0 to 0.5.1 for patch release.
Brief description of what this release includes (new features, bug fixes,
improvements).
Tips for finding changes since last release:
git log $(git describe --tags --abbrev=0)..HEAD --oneline
gh pr list --state merged --limit 50
Example from recent release:
- PR #60: "Release v0.6.0" - Bump version from 0.5.0 to 0.6.0 for minor release
6. Merge PR to Main
Once the PR is reviewed and approved (or if you have permission, merge
directly):
gh pr merge --squash
Note: The project currently uses a lightweight release process. For minor
version bumps and non-breaking changes, you can merge your own release PRs after
verifying all checks pass.
7. Monitor Automated Release
The automated workflow will:
-
CI Workflow runs first (.github/workflows/ci.yml):
- Runs linting (formatting, clippy)
- Runs prettier checks
- Runs tests on Ubuntu and macOS
- Validates baselines
-
Release Workflow triggers after CI succeeds
(.github/workflows/release.yml):
- Checks if version changed (using
scripts/check-version-change.sh)
- Builds binaries for multiple platforms:
- Linux x64 (
x86_64-unknown-linux-gnu)
- Linux ARM64 (
aarch64-unknown-linux-gnu)
- macOS Universal (
universal-apple-darwin - Intel + Apple Silicon)
- Signs binaries with cosign (keyless signing)
- Creates GitHub release with:
- Release notes (from PR description and auto-generated from commits)
- Binary artifacts
- SHA256 checksums
- Cryptographic signatures (.sig files)
- Creates and pushes git tag (format:
{version}, e.g., 0.5.1)
-
Validate Release Workflow runs after release is published
(.github/workflows/validate-release.yml):
- Validates all binary signatures using cosign
- Tests local aqua configuration
- Reports next steps (aqua registry submission)
8. Monitor Workflow Progress
Check workflow status:
gh run list --limit 5
gh run watch
gh run view --log
Or visit: https://github.com/technicalpickles/envsense/actions
9. Verify Release
Once complete, verify the release:
git fetch --tags
git tag --sort=-version:refname | head -5
gh release view 0.5.1
gh release download 0.5.1 --pattern "*x86_64-unknown-linux-gnu*"
10. Post-Release Tasks (Optional)
After a successful release:
-
Update aqua registry (if needed):
-
Announce release (if significant):
- Update project documentation
- Post to relevant channels/communities
Binary Naming Convention
Released binaries follow this pattern:
envsense-{version}-{target}
Examples:
envsense-0.5.1-x86_64-unknown-linux-gnu (Linux x64)
envsense-0.5.1-aarch64-unknown-linux-gnu (Linux ARM64)
envsense-0.5.1-universal-apple-darwin (macOS Universal)
Each binary includes:
.sha256 checksum file
.sig cryptographic signature file
.bundle signature bundle file
Testing Releases Locally
Before pushing a release, you can test the build process:
./scripts/test-release.sh
./scripts/build-target.sh x86_64-unknown-linux-gnu normal
./scripts/build-target.sh universal-apple-darwin universal
lipo -info target/universal-apple-darwin/release/envsense
./scripts/prepare-binary.sh 0.5.1-test x86_64-unknown-linux-gnu
./scripts/validate-binary.sh dist/envsense-0.5.1-test-x86_64-unknown-linux-gnu
Prerequisites for local testing:
- Rust toolchain with rustup
- For Linux builds on macOS: Docker (use
./scripts/dev-docker.sh)
- For universal macOS builds: macOS with Xcode command line tools
Troubleshooting
Release Workflow Didn't Trigger
Check:
- CI workflow completed successfully
- Version in Cargo.toml changed from last tagged release
- No existing tag with that version exists
- Push was to
main branch
Build Failed
Check:
- All tests pass locally:
cargo test --all
- Code compiles for all targets
- Review workflow logs:
gh run view --log
Signature Validation Failed
The validate-release workflow might fail if:
- Cosign signatures weren't created properly
- Network issues downloading release assets
- This is usually non-critical; the release itself succeeded
Need to Retry a Release
If you need to fix and retry:
- Delete the GitHub release:
gh release delete 0.5.1
- Delete the git tag locally and remotely:
git tag -d 0.5.1
git push origin :refs/tags/0.5.1
- Fix issues in a new commit
- Restart from step 5 (commit and push)
Schema Version Considerations
Important: The JSON schema version (currently 0.3.0) is separate from the
crate version.
When making breaking schema changes:
- Update
SCHEMA_VERSION in src/schema/main.rs
- Update all snapshots:
cargo insta accept
- Document changes in migration guide:
docs/migration-guide.md
- Reference CONTRACT.md for compatibility guarantees
Schema changes require:
- Field renames: Add
#[serde(alias = "old_name")]
- Field removals: Bump schema version
- New fields: Can be added freely (non-breaking)
Note: Most releases do NOT require schema version changes. Only bump the
schema version when making breaking changes to the JSON output structure.
Release Checklist
Use this checklist when performing a release:
Pre-Release Verification:
Version Bump and PR:
Automated Release Verification:
Post-Release Testing:
Key Files and Scripts
Configuration:
GitHub Workflows:
Release Scripts:
scripts/check-version-change.sh - Detects version changes and determines if
release is needed
scripts/build-target.sh - Builds for specific targets (normal or universal)
scripts/prepare-binary.sh - Prepares release artifacts with checksums
scripts/filter-release-files.sh - Filters artifacts for release
scripts/sign-release-binaries.sh - Signs binaries with cosign (keyless)
scripts/check-signing-completed.sh - Verifies all signatures were created
scripts/validate-signing.sh - Validates signatures for a release
scripts/create-release.sh - Extracts changelog content (if exists)
scripts/test-release.sh - Comprehensive local release testing
Documentation:
Support
For issues with the release process:
- Check GitHub Actions logs
- Review recent successful releases for comparison
- Consult
docs/development.md for detailed documentation
- Open an issue if you discover a bug in the release workflow