This repository contains Reusable CI/CD Scaffolding for GitHub Actions, designed to be easily copied to new projects.
- Versioning: Semantic versioning managed by a central
VERSIONfile. - Manual Releases: Trigger releases (Major, Minor, Patch) via GitHub Actions UI.
- Nightly Builds: Automatic tagging of nightly builds on pushes to
develop. - Auto-Approval: Automatic approval of PRs from
dev/*branches (configurable). - Cleanup: Scheduled cleanup of old nightly tags.
To replicate this process in a new repository:
-
Copy Files: Copy the following to your repo root:
VERSION.github/main_release_names.json.github/tags_to_keep_forever.json.github/scripts/release.py.github/workflows/(all files).github/tests/(optional, for verification)
-
Configure GitHub Settings:
- Go to Settings > Actions > General.
- Under Workflow permissions, select Read and write permissions.
- Check Allow GitHub Actions to create and approve pull requests.
Go to the Actions tab in your repository, select Manual Release, and click Run workflow. Choose the release type:
majorminorpatch
To reset the version to 0.0.0 (only works if repo name is github_scaffolding):
python3 .github/scripts/release.py --type resetPushing to the develop branch will automatically trigger a nightly build/tag.