Standalone scripts to build a Nextcloud server release without GitHub Actions. These are the same scripts used by the release-build.yml workflow.
git,jq,php(compatible version),composersudo(for setting file ownership)tar,zip,sha256sum,sha512sum,md5sum- Signing key (PEM) if signing is needed
Build a release for v34.0.1:
SCRIPTS=".github/scripts"
VERSION="34.0.1"
TAG="v${VERSION}"
CONFIG="stable34.json"
# 1. Fetch all components
bash "$SCRIPTS/fetch-all.sh" "$TAG" "$CONFIG" /tmp/build --docs
# 2. Clean server dev files (removes .git automatically after using it)
bash "$SCRIPTS/clean-server-dev-files.sh" /tmp/build/server
# 3. Assemble into nextcloud/ structure
bash "$SCRIPTS/assemble.sh" /tmp/build /tmp/nextcloud
# 4. Clean dev files from all apps, core, settings
for dir in /tmp/nextcloud/apps/*/ /tmp/nextcloud/core/ /tmp/nextcloud/settings/; do
bash "$SCRIPTS/clean-dev-files.sh" "$dir"
done
# 5. Update version.php
bash "$SCRIPTS/update-version-php.sh" /tmp/nextcloud stable stable34
# 6. Sign (optional, requires signing key)
bash "$SCRIPTS/sign-release.sh" /tmp/nextcloud /path/to/signing-key.pem
# 7. Generate metadata (NC30+, optional)
bash "$SCRIPTS/generate-metadata.sh" /tmp/nextcloud "$VERSION" ./releases
# 8. Package (creates tar.bz2, zip, checksums)
bash "$SCRIPTS/package.sh" /tmp/nextcloud "$VERSION" ./releases| Script | Purpose |
|---|---|
fetch-all.sh |
Clone server, 3rdparty, all apps, updater, skeleton, docs |
assemble.sh |
Place all components into the nextcloud/ structure |
clean-server-dev-files.sh |
Remove dev files from server (uses .nextcloudignore or hardcoded list) |
clean-dev-files.sh |
Remove dev files from an app directory |
update-version-php.sh |
Rewrite version.php with channel, build timestamp, edition |
sign-release.sh |
Sign core + all apps with occ integrity commands |
generate-metadata.sh |
Generate migration metadata (NC30+) |
package.sh |
Set permissions, create tar.bz2 + zip, generate checksums |
Milestone management, repository tagging and the updater-server PR have moved to the unit-tested PHP package in
tools/release/(milestones:update,milestones:audit,repo:tag,updater:bump).
Moved to the PHP package - see tools/release/,
which documents the full release auto-logic (when milestones are created/closed,
when tags are created, which branch is used).
The audit determines expected state from the latest stable release tags on
nextcloud-releases/server. It exits with code 1 if issues are found.
Both scripts require gh CLI authenticated with a token that has repo access to all Nextcloud repositories.
fetch-all.shruns composer automatically on apps with runtime dependenciesclean-server-dev-files.shmust run before removing.gitfrom the server (it usesgit ls-filesfor .nextcloudignore)sign-release.shuses the repo'sresources/codesigning/core.crtby default. Pass a custom cert as the third argument for testingpackage.shrequiressudoto set file ownership tonobody:nogroup- The workflow adds parallelism (fetches all apps simultaneously) and a compare step. The scripts produce identical output