Warning
This project is vibe coded and has been audited but I'm no Ruby developer.
It doesn't have much weight but it does have my biases like squash preference, commit names, etc., ymmv.
Ruby CLI for releasing Nextcloud apps using git and gh.
It automates changelog updates, semver bumps, PR creation, tagging, releases, and workflow monitoring for Nextcloud app repositories.
- Ruby 3.1+
gitinPATHghinPATHand logged in (gh auth status)
- Target repo needs
appinfo/info.xmland achangelog.yaml(see example file atexample/changelog.yaml) - The
releaseremote is optional. If absent, tag push, GitHub release creation, and Actions monitoring are skipped for it with a warning.
gem install nextcloud_release_agentUser-local (no root):
gem install --user-install nextcloud_release_agent
export PATH="$(ruby -r rubygems -e 'print Gem.user_dir')/bin:$PATH"Or without gem install:
git clone https://github.com/nextcloud/release_agent
ruby release_agent/exe/nextcloud-release-agent --helpPrepare + publish in one shot
nextcloud-release-agent run --monitorCreate release PR only
nextcloud-release-agent prepareMerge, tag, release
nextcloud-release-agent publish --monitorWatch Github Actions for the latest version
nextcloud-release-agent monitorWatch Github Actions for a specific version
nextcloud-release-agent monitor --repo translate2 2.4.0run
Runs prepare then publish in one shot. Use this for the happy path.
prepare
- Fetch and sync the default branch.
- Collect commits since the last
v*tag. - Filter out commits matching
release_agent.ignore_commitsinchangelog.yaml. - Fetch the GitHub PR for each commit.
- Compute the next semver version.
- Prepend a new changelog entry.
- Render
CHANGELOG.md. - Update
appinfo/info.xml(and<image-tag>if present). - Create a
release/<version>branch, commit, push, open a PR.
publish
- Squash-merge the release PR (
--admin), or wait for a manual merge. - Pull the merged default branch.
- Create and push
v<version>tooriginandrelease. - Create GitHub releases in both remotes with the rendered changelog entry.
- Optionally monitor the resulting GitHub Actions runs (
--monitor).
Version is derived from commit and PR metadata:
- Major:
BREAKING CHANGE, conventional!:marker, or a breaking label. - Minor: anything that looks like a feature or enhancement.
- Patch: everything else after ignore rules are applied.
Changelog sections: Added for features, Fixed for fixes/security, Changed for breaking and everything else.
Put ignore rules in the target repo's changelog.yaml:
release_agent:
ignore_commits:
- author: "^pre-commit-ci\\[bot\\]$"
- author: "^nextcloud-bot$"
- author: "^dependabot\\[bot\\]$"Rules are regexes. Omit a key to match anything.
It guides others to treasures it cannot possess. Releases are manual for now.