diff --git a/README-Dev.md b/README-Dev.md index 6f6e4513..d028776c 100644 --- a/README-Dev.md +++ b/README-Dev.md @@ -741,4 +741,21 @@ There is no other caching of "instance" data in Prez. ## Release Process -Semantic-release has been set up on this repository. Conventional Commit messages should be used for all commits (https://www.conventionalcommits.org/en/v1.0.0/), though it is not currently enforced with any actions etc. Releases are automatically made when PRs are merged to main, based on the commit messages. NB if squashing commits when merging a PR, the commit messages are merged, and the PR title will be included at the start of the commit message. This means the PR title needs to follow conventional commit conventions in order for the release process to be triggered. \ No newline at end of file +[Semantic Release](https://github.com/cycjimmy/semantic-release-action) has been set up to automate the release process for this repository, based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). Conventional Commit messages should preferably be used for all commits, and MUST be used for PR titles (which become commit headers). PR Titles are validated using [commitlint](https://www.npmjs.com/package/commitlint), and if failing, will prevent a merge of the PR to main. + +The release rules, i.e. how Semantic Release increments the version based on the commit messages, are as follows: + +```yaml +- type: "feat" + release: "minor" +- type: "fix" + release: "patch" +- type: "perf" + release: "patch" +- type: "docs" + release: "patch" +- type: "revert" + release: "patch" +- breaking: true + release: "major" +``` \ No newline at end of file diff --git a/README.md b/README.md index cef8f30e..5b59ba5c 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ poetry run python main.py ### Running in a Container -Prez container images are built using a Github Action and are available [here](https://github.com/RDFLib/prez/pkgs/container/prez). +Prez container images are built using a GitHub Action and are available [here](https://github.com/RDFLib/prez/pkgs/container/prez). The Dockerfile in the repository can also be used to build a Docker image. @@ -222,7 +222,7 @@ The Dockerfile in the repository can also be used to build a Docker image. The image name is `ghcr.io/rdflib/prez`. -The `latest` tag points to the latest stable release of Prez. All latest stable releases have a major, major and minor, and major, minor and patch tag pointing to it. +The `latest` tag points to the latest stable release of Prez. All latest stable releases have a `major`, `major.minor`, and `major.minor.patch` tag pointing to it. For example, for a release with a git tag of 3.2.4, the following tags will be on the container image: @@ -231,21 +231,8 @@ For example, for a release with a git tag of 3.2.4, the following tags will be o - `3.2.4` - `latest` -New commits to the `main` branch creates a rolling dev image with the `dev` tag. The dev builds will also include a tag in the form of major.minor.{patch+1}-dev.{commits-since-last-release}.{short-commit-sha}. This conforms to semantic versioning and will be recognized by orchestration systems to perform automatic releases. - -For example, if the latest release is 3.2.4 and there have been 7 new commits since the release and the short commit SHA is fc82562, then the container image tag will be: - -- `3.2.5-dev.7.fc82562` - -To run the pulled docker image: - -``` -docker run -p 8000:8000 \ - -e SPARQL_ENDPOINT= \ - -``` - -The above command starts a Docker container running Prez on port 8000, connected to the specified sparql endpoint. +The full version is automatically created/incremented using the [Semantic Release GitHub Action](https://github.com/cycjimmy/semantic-release-action), which automatically increments the version based on commits to the `main` +branch. ### Testing