diff --git a/README.md b/README.md index 8a934c2..3ddc4cf 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,21 @@ apply to every repository in the organization that does not define its own. | [AI_POLICY.md](AI_POLICY.md) | AI Contribution Policy — AI may assist, a human owns every commit. | | [CONTRIBUTING.md](CONTRIBUTING.md) | Default contributing guide, shown when opening issues and pull requests. | | [.github/workflows/human-commit-ownership.yml](.github/workflows/human-commit-ownership.yml) | "AI Policy Check" — fails a pull request whose commits list an AI tool as author or co-author. | +| [workflow-templates/](workflow-templates) | Starter workflows offered when adding a workflow to a repository. | GitHub picks up `CONTRIBUTING.md` automatically for repositories without their own copy. Workflows are not inherited: copy `human-commit-ownership.yml` into a repository to enable the check there. +## Starter workflows for Scala projects + +`workflow-templates/` adds **Scala CI** and **Scala Release** to the "New workflow" picker for any +repository in the organization with a `build.sbt`. Both are thin callers of the shared workflows in +[scala-github-actions](https://github.com/evolution-gaming/scala-github-actions), which is where the +inputs and behaviour are documented. + +These are offered, not enforced — a new repository can still skip them. To guarantee CI on every +repository, add the shared workflow to an organization ruleset the way the AI Policy Check does. + ## Enabling the AI Policy Check 1. Copy `.github/workflows/human-commit-ownership.yml` into the target repository. diff --git a/workflow-templates/scala-ci.properties.json b/workflow-templates/scala-ci.properties.json new file mode 100644 index 0000000..8a3d13d --- /dev/null +++ b/workflow-templates/scala-ci.properties.json @@ -0,0 +1,7 @@ +{ + "name": "Scala CI", + "description": "Test, coverage, binary compatibility and formatting for a Scala project, via the shared Evolution workflow.", + "iconName": "example", + "categories": ["Scala", "Continuous integration"], + "filePatterns": ["build.sbt$"] +} diff --git a/workflow-templates/scala-ci.yml b/workflow-templates/scala-ci.yml new file mode 100644 index 0000000..1647815 --- /dev/null +++ b/workflow-templates/scala-ci.yml @@ -0,0 +1,10 @@ +name: CI + +on: + push: + branches: [ $default-branch ] + pull_request: + +jobs: + test: + uses: evolution-gaming/scala-github-actions/.github/workflows/ci.yml@e9f3a8d1d95e9ed5b762627a28a1ce93fad45f0a # v6.2.0 diff --git a/workflow-templates/scala-release.properties.json b/workflow-templates/scala-release.properties.json new file mode 100644 index 0000000..28fc9ea --- /dev/null +++ b/workflow-templates/scala-release.properties.json @@ -0,0 +1,7 @@ +{ + "name": "Scala Release", + "description": "Publish a tagged Scala release to Evolution's Artifactory, via the shared Evolution workflow.", + "iconName": "example", + "categories": ["Scala", "Publishing"], + "filePatterns": ["build.sbt$"] +} diff --git a/workflow-templates/scala-release.yml b/workflow-templates/scala-release.yml new file mode 100644 index 0000000..ab1f116 --- /dev/null +++ b/workflow-templates/scala-release.yml @@ -0,0 +1,12 @@ +name: Publish Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@e9f3a8d1d95e9ed5b762627a28a1ce93fad45f0a # v6.2.0 + # the release job publishes to Artifactory, so it does need the org secrets + secrets: inherit