-
Notifications
You must be signed in to change notification settings - Fork 14
Developer Release Process
The release process is fully automated with the ./scripts/release tool.
# Create beta release (interactive, opens editor for notes)
./scripts/release beta --editor
# Create production release from main
git checkout main
./scripts/release patch --editorThe release script automates:
- β
Version management in
manifest.json - β Git commit and annotated tag creation
- β Pushing to GitHub (triggers automated workflow)
- β Editing GitHub release with notes and prerelease flag
- β Verifying ZIP asset creation
./scripts/release [VERSION_SPEC] [OPTIONS]VERSION_SPEC:
-
patch- Increment patch version (X.Y.Z+1) -
minor- Increment minor version (X.Y+1.0) -
major- Increment major version (X+1.0.0) -
beta- Auto-increment beta version -
X.Y.Z- Explicit version number -
X.Y.Z-beta.N- Explicit beta version - (omit for interactive mode)
OPTIONS:
-
--dry-run- Preview operations without executing -
--yes, -y- Skip confirmation prompts -
--editor, -e- Open editor for release notes -
--notes FILE- Read release notes from file -
--auto-notes- Use auto-generated notes only -
--force-branch- Skip branch validation -
--help, -h- Show help text
When to use: Testing new features on feature branches
Characteristics:
- Created from feature branches
- Version format:
X.Y.Z-beta.N - Marked as "prerelease" on GitHub
- Includes testing instructions
- Not recommended for production use
Example workflow:
# On feature branch
git checkout feature/new-feature
# Create beta release (auto-increment)
./scripts/release beta --editor
# Or with explicit version
./scripts/release 2.5.1-beta.1 --editorRelease notes template:
# Beta Release vX.Y.Z-beta.N
**β οΈ BETA RELEASE** - This is a beta version for testing purposes.
## Changes
- Feature: [description]
- Bug fix: [description]
## Testing Instructions
1. Install vX.Y.Z-beta.N
2. Test: [specific test cases]
3. Report issues at: https://github.com/jrhubott/adaptive-cover/issues
## Installation
Download `adaptive_cover_pro.zip` from assets below.When to use: Stable releases from main branch
Characteristics:
- Created from
mainbranch only - Version format:
X.Y.Z - Not marked as prerelease
- Production-ready
- Full release notes
Example workflow:
# Merge feature branch to main
git checkout main
git merge feature/new-feature
git push origin main
# Create production release
./scripts/release patch --editor
# or
./scripts/release 2.5.0 --editorRelease notes template:
# Adaptive Cover Pro vX.Y.Z
## What's New
- [Feature highlights]
## Bug Fixes
- [Bug fixes]
## Breaking Changes
None
## Installation
### HACS: Update through HACS
### Manual: Download adaptive_cover_pro.zipWhen to use: never by hand β .github/workflows/nightly.yml runs it on a schedule. There is no ./scripts/release nightly mode.
Characteristics:
- Built from the tip of
developdaily at ~07:00 UTC (also runnable viaworkflow_dispatch) - Version format:
X.Y.Z-nightly.<UTCtimestamp>, whereX.Y.Zis one patch above the current manifest version with any pre-release suffix stripped β this guarantees the nightly sorts above the installed stable so HACS offers it as an update - Marked as "prerelease" on GitHub
- Only the newest 3 nightly releases are kept; older ones are deleted automatically (tag and release)
How it differs from a beta: a beta is a deliberate, human-authored cut with real release notes. A nightly is a snapshot of whatever is on develop, gated only by the test suite. It carries no curated notes and no "Should I install this?" guidance.
What the workflow does:
-
Compute & gate β checks out
develop, computes the-nightlyversion, and counts commits since the lastv*-nightly.*tag. Ifdevelopis unchanged, it setsshould_run=falseand stops β no empty nightly. -
Test gate β reuses
tests.yml. The nightly is only published if the full suite passes. -
Tag & publish β writes the nightly version into
manifest.json, makes an ephemeralchore: nightly buildcommit, tags it, and pushes only the tag (never the commit) sodevelophistory stays clean.publish-release.ymlthen builds and publishes the pre-release. The tag is pushed withRELEASE_PAT, notGITHUB_TOKENβ a tag pushed with the default token would not triggerpublish-release.yml. - Prune β deletes all but the three most recent nightly releases.
Why the workflow lives on main: GitHub fires on: schedule only from the repository's default branch. Every job inside it operates on develop regardless (it checks out develop to compute the version and build the tagged commit).
Here's what happens when you run the release script:
1. Validate Environment
ββ Check required tools (git, gh, jq)
ββ Verify gh authentication
ββ Ensure working directory is clean
ββ Validate manifest.json exists
2. Calculate Version
ββ Read current version from manifest.json
ββ Calculate new version based on VERSION_SPEC
ββ Validate version format
3. Validate Branch
ββ Check current branch
ββ Ensure branch matches release type
β ββ Beta: Any branch (usually feature/*)
β ββ Production: main branch only
ββ Skip with --force-branch if needed
4. Get Release Notes
ββ Option 1: Open editor (--editor)
ββ Option 2: Read from file (--notes FILE)
ββ Option 3: Auto-generate (--auto-notes)
5. Update Version
ββ Update manifest.json with jq (preserves formatting)
6. Create Git Commit
ββ Stage manifest.json
ββ Commit: "chore: Bump version to vX.Y.Z"
7. Create Annotated Tag
ββ Tag name: vX.Y.Z
ββ Tag message: Release notes (Co-Authored-By filtered)
8. Push to GitHub
ββ Push commit to current branch
ββ Push tag (triggers GitHub Actions workflow)
9. Wait for Workflow
ββ Poll GitHub every 5s
ββ Timeout: 60s
ββ Workflow creates initial release + ZIP asset
10. Edit Release
ββ Set title: "Adaptive Cover Pro β
vX.Y.Z"
ββ Set detailed notes
ββ Add --prerelease flag for beta releases
11. Verify ZIP Asset
ββ Check adaptive_cover_pro.zip exists
ββ Verify size is reasonable (100KB-500KB)
ββ Display success message with release URL
# On feature branch with new feature
git checkout feature/diagnostic-sensors
# Run release script in interactive mode
./scripts/release
# Select "1) Beta"
# Opens editor with template
# Edit release notes, save, and close
# Confirms and creates release# Auto-increment beta, use auto-generated notes
./scripts/release beta --yes --auto-notes# Ensure on main branch
git checkout main
# Create patch release with editor
./scripts/release patch --editor
# Edit release notes with full changelog
# Confirms and creates production release# Create specific version
./scripts/release 2.6.0-beta.1 --editor# Prepare release notes
cat > /tmp/release-notes.md << 'EOF'
# Adaptive Cover Pro v2.5.0
## What's New
- New diagnostic sensors for troubleshooting
- Improved manual override detection
- Support for open/close-only covers
## Bug Fixes
- Fixed inverse state behavior for open/close-only covers
- Corrected unit display for Last Cover Action sensor
EOF
# Create release with notes from file
./scripts/release 2.5.0 --notes /tmp/release-notes.md --yes# Preview what would happen without making changes
./scripts/release beta --dry-run
# Output shows all operations that would be performed
# No actual changes to git or GitHubBefore creating a release:
- All changes committed and pushed to feature branch
- Pre-commit hooks passing
- Code linted:
./scripts/lint - Manual testing completed with
./scripts/develop - README.md updated with new features/entities
- CLAUDE.md updated if development process changed
- Working directory clean:
git status
For beta releases:
- On feature branch
- Version will be X.Y.Z-beta.N
For production releases:
- On main branch
- Beta testing completed successfully
- Version will be X.Y.Z (no beta suffix)
β Working directory is not clean
βΉ Commit or stash changes before creating a release
Solution: Commit or stash your changes:
git add .
git commit -m "your message"
# or
git stashβ Production releases must be created from main branch
βΉ Current branch: feature/my-feature
βΉ Switch to main: git checkout main
Solution: Either:
- Switch to main:
git checkout main - Use beta version:
./scripts/release beta - Override (not recommended):
./scripts/release --force-branch
β Tag already exists locally: v2.5.0
Solution: Use a different version:
# Delete local tag if it's a mistake
git tag -d v2.5.0
# Or use a different version
./scripts/release 2.5.1β GitHub CLI not authenticated
βΉ Run: gh auth login
Solution: Authenticate with GitHub:
gh auth login
# Follow the prompts to authenticateβ ZIP asset not found: adaptive_cover_pro.zip
Solution: Check GitHub Actions workflow:
# View recent workflow runs
gh run list --workflow=publish-release.yml
# View specific run details
gh run view <run-id>The workflow might have failed. Check the logs and re-run if necessary.
β Workflow did not complete within 60s
Solution: The workflow is probably still running:
# Check workflow status
gh run list --workflow=publish-release.yml
# Wait for it to complete, then manually edit the release
gh release edit v2.5.0 --title "Title" --notes "Notes"The release script automatically rolls back changes if an error occurs:
- Deletes the local tag (if created)
- Deletes the remote tag (if pushed)
- Resets the commit (if manifest.json was committed)
If you need to manually rollback:
# Delete local tag
git tag -d vX.Y.Z
# Delete remote tag
git push --delete origin vX.Y.Z
# Reset last commit (if needed)
git reset --hard HEAD^
# Force push to remote (if commit was already pushed)
git push --force origin feature/branch-nameFor automated releases in CI/CD pipelines:
# Non-interactive, no prompts, auto-generated notes
./scripts/release beta --yes --auto-notesEnvironment variables needed:
-
GITHUB_TOKEN- Forghauthentication - GitHub Actions automatically provides this
π Home Β· β¨ Features Β· π° What's New
π Getting Started
- Installation
- Migrating from Custom Repository
- Migrating from Adaptive Cover
- First-Time Setup
- Cover Types
π§ Core Concepts
π Cover Types
βοΈ Configuration
- Sun Tracking
- Position
- Glare Zones
- Automation
- Custom Position
- Force Override
- Weather Safety
- Climate
- Blindspot
- Summary Screen
- Debug & Diagnostics
π Entities & Services
- Entities
- Proxy Cover Entity
- Position Verification
- My Position Support (Somfy RTS)
- Runtime Configuration Services
π οΈ Operations
π§ Advanced Use Cases
- Dynamic Temperature Thresholds
- Dynamic Tracking Window
- Bedroom Sleep Mode
- Handling Variable Cloud Cover
- Venetian Tilt-Only on Overcast Days
π¨ Dashboard
π§ͺ Testing & Simulation
π Reference
π©βπ» For Developers