Denotation
denotation
is a tool for versioning and creating GitHub releases, which can
run as part of an automatic Continuous Integration & Continuous Delivery (CI/CD)
pipeline. The next semantic version is determined by
conventional commit history.
Requirements
deno
1.21 or highergit
andgh
(available by default in GitHub Actions)
Installation
The program can be invoked directly via URL or installed as a CLI. The default
name when installing is denotation
, but a custom name can be chosen.
deno run --allow-run='gh,git' --unstable https://deno.land/x/denotation@v0.4.5/cli.ts -- --help
deno install --allow-run='gh,git' --unstable -n denote https://deno.land/x/denotation@v0.4.5/cli.ts
denote --help
Usage
When the script runs it will look at the commits made since the last git tag,
for example v1.0.0
. Depending on the conventional commit messages it will
increment with either a patch (v1.0.1
), minor version (v1.1.0
) or major
version (v2.0.0
).
The following example shows how to use denotation
as a step in GitHub Actions
to create a release:
name: release
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1.1.0
with:
deno-version: v1.x.x
- run: deno run --allow-run='gh,git' --unstable https://deno.land/x/denotation@v0.4.5/cli.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub Actions built-in variable.
At the moment Continuous Delivery is supported where a draft release is made
with generated release notes and some final edits can be made before publishing
to a module registry like deno.land/x
.
Pre-releases
Currently there is support for pre-releases with the suffix -alpha.[version]
.
Use the --prerelease
option to make the next release a pre-release.
If you are on v1.0.0
, and you make a fix:
commit for example, with
--prerelease
the next version will become v1.0.1-alpha.0
.
Roadmap
- Support Continuous Deployment, where release is immediate
- Support filtering certain commits from release notes (such as
chore
andci
) - Support custom version increments based on commit scope like
feat(ci)
incrementing as a patch instead of a minor release.
Contributing
You are welcome to report bugs, other issues, or make a feature request! If you want to add a fix/feature/other improvement, fork this repository and make a pull request with your changes.