Skip to content

Commit

Permalink
docs: added semantic release user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
c-saw committed May 15, 2024
1 parent 9b41bf3 commit 54ca760
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@ -0,0 +1,15 @@
# User Guides

- [Perform static analysis](./user-guides/Perform_static_analysis.md)
- [Run Git hook on commit](./user-guides/Run_Git_hooks_on_commit.md)
- [Scan dependencies](./user-guides/Scan_dependencies.md)
- [Scan secrets](./user-guides/Scan_secrets.md)
- [Semantic release](./user-guides/Semantic_release.md)
- [Sign Git commits](./user-guides/Sign_Git_commits.md)
- [Test GitHub Actions locally](./user-guides/Test_GitHub_Actions_locally.md)

## Developer Guides

- [Bash and Make](./developer-guides/Bash_and_Make.md)
- [Scripting Docker](./developer-guides/Scripting_Docker.md)
- [Scripting Terraform](./developer-guides/Scripting_Terraform.md)
38 changes: 38 additions & 0 deletions docs/user-guides/Semantic_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Guide: Semantic release

- [Guide: Semantic release](#guide-semantic-release)
- [Overview](#overview)
- [Key files](#key-files)
- [Configuration checklist](#configuration-checklist)
- [Testing](#testing)

## Overview

Semantic release ([semantic-release](https://semantic-release.gitbook.io/semantic-release)) is used for automatically tagging and creating GitHub releases with change logs from commit messages. It uses the [SemVer](https://semver.org/) convention and the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification by describing the features, fixes, and breaking changes made in commit messages.

The table below shows which commit message gets you which release type when semantic-release runs (using the default configuration):

| Commit message | Release type |
|----------------|--------------|
| `fix(pencil): stop graphite breaking when too much pressure applied` | ~~Patch~~ Fix Release |
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
| `perf(pencil): remove graphiteWidth option`<br/>`BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release <br/>(Note that the BREAKING CHANGE: token must be in the footer of the commit) |

## Key files

- [`.releaserc`](../../.releaserc): semantic-release's configuration file, written in YAML or JSON

## Configuration checklist

Configuration should be made in the `.releaserc` file.

- Adjust the [configuration settings](https://semantic-release.gitbook.io/semantic-release/usage/configuration#branches) to align with your project's branching strategy
- Configure [plugins](https://semantic-release.gitbook.io/semantic-release/usage/plugins) depending on your needs

## Testing

```shell
$ make runner-act workflow="cicd-1-pull-request" job="semantic-release"
```

This will `dry-run` a semantic release and output the variables to the console

0 comments on commit 54ca760

Please sign in to comment.