diff --git a/docs/samples/release.container.md b/docs/samples/release.container.md index f7e083b..d452e51 100644 --- a/docs/samples/release.container.md +++ b/docs/samples/release.container.md @@ -6,6 +6,8 @@ The idea is to provide a drop-in model for releasing software, where developers This exists within the existing constraints of Github, mostly that [automated releases cannot trigger other workflows](https://github.com/orgs/community/discussions/25281), so by composing reusable workflows together we can achieve a full release pipeline that is still easy to understand and maintain. The workflow is also designed to be flexible, so you can easily swap out the container publishing step for other types of release artifacts if needed. +Currently only Python is supported, with the intention to provide C# and Typescript soon. + ## Overview The workflow performs the following steps: @@ -21,6 +23,7 @@ The workflow performs the following steps: - Your repository settings should only allow squash merges, and use the PR title as the commit message for commit messages to be correctly parsed by semantic-release - You need a `samples/release.config.js` in your repository root to configure semantic-release - You need a `Dockerfile` in your repository root (or update the `dockerfile` parameter) +- You need to follow the relevant language steps ## Workflow Jobs @@ -72,6 +75,12 @@ uses: health-informatics-uon/workflows/.github/workflows/semantic-release.yml@v1 Check the [releases](https://github.com/health-informatics-uon/workflows/releases) for available versions. +## Languages + +### Python + +Follow the `samples/pyproject.toml` sample. + ## Usage 1. Copy `samples/release.container.yaml` to your repository's `.github/workflows/release.yaml` diff --git a/samples/pyproject.toml b/samples/pyproject.toml new file mode 100644 index 0000000..f5fd337 --- /dev/null +++ b/samples/pyproject.toml @@ -0,0 +1,14 @@ +[project] +name = "sample" + +# Makes the version dynamic +dynamic = ["version"] + +# Adds the hatch-vcs dependency +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + +# Sources the version from version control +[tool.hatch.version] +source = "vcs"