Default workflow, documentation and root files for scala libraries
- What files does it generate?
- How are files generated?
- What settings spread?
This plugin generates default Github Actions workflows, documentation templates, configuration files, secrets and repository settings for @alejandrohdezma's Scala libraries repositories.
Add the following line to your
addSbtPlugin("com.alejandrohdezma" % "sbt-ci" % "1.3.1")
Once the plugin has been installed just execute
sbt generateCiFiles to automatically add all the documentation, workflows and settings files to the project. Once these files are committed it will automatically update the plugin (and therefore the files) by using Scala Steward.
What files does it generate?
Github Actions workflows
|File||Copied as...||Enabled on...||Description|
||Pushes to master and PRs||Runs
||Releases and manually||Runs
||Releases and pushes to master||Creates a release of the project by running
||By cron and manually||Runs Scala Steward periodically on the project (with the current configuration it will launch at 7:00 am (CET) on Monday, Wednesday and Friday).|
||Merging pull-requests||This workflow drafts your next release notes as pull requests are merged into master. Given the current configuration, it creates categories depending on the PRs labels. An example of a generated release body can be found here.|
All the workflows need specific secrets to be enabled in the repository.
These documentation templates are expected to be used in conjunction with mdoc. Some of them use special
mdocVariables that can be automatically included by using sbt-github-mdoc plugin. All of these templates should be compiled and processed into their final files when launching
sbt ci-docs in the
||Contains both the list of contributors and project collaborators.||
||Nope||Code of conduct for the repository. Links to the Scala Code of Conduct.||
||Explains how a user can contribute to the project.||
||Default license for the project.||
||Contains the copyright notices for the organization/owner.||
These files will be copied to the root directory of the remote project:
||Typical git ignoring configurations for a Scala project.|
How are files generated?
After each release of this plugin Scala Steward will update the plugin version in all the repositories that use it and when the
ci.yml workflow workflow gets launched, it will execute
sbt generateCiFiles (creating, updating or deleting files handled by the plugin).
What settings spread?
The following repository settings will be enforced on every repository:
- Wikis will be disabled.
- Branches will be deleted after merge them.
- The default branch will be master.
- Squash merging will be enabled.
- Merge commits will be enabled.
- Rebase merging will be disabled.
It will also spread a set of labels to be used on issues & pull-requests (detailed here).
Lastly it will add branch protection on the master branch requiring:
- At least 1 pull request review from a code-owner.
- Pull-request branches should be up-to-date with master.
- The ci.yml workflow should pass correctly.
Admins will be allowed to bypass this protection and merge PRs on any condition.