https://github.com/aoepeople/semanticore
Semanticore: Your friendly Semantic Release Bot ๐ค ๐ฆ ๐. Autogenerate Release Notes from Commits and automate Github/Gitlab Release generation.
https://github.com/aoepeople/semanticore
automation bot changelog conventional-commits hacktoberfest semantic-release semantic-versioning
Last synced: 11 months ago
JSON representation
Semanticore: Your friendly Semantic Release Bot ๐ค ๐ฆ ๐. Autogenerate Release Notes from Commits and automate Github/Gitlab Release generation.
- Host: GitHub
- URL: https://github.com/aoepeople/semanticore
- Owner: AOEpeople
- License: mit
- Created: 2022-03-04T14:51:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-11T14:35:37.000Z (about 1 year ago)
- Last Synced: 2025-07-23T19:34:11.879Z (11 months ago)
- Topics: automation, bot, changelog, conventional-commits, hacktoberfest, semantic-release, semantic-versioning
- Language: Go
- Homepage:
- Size: 80.1 KB
- Stars: 19
- Watchers: 4
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
- License: License
Awesome Lists containing this project
README
# Semanticore Release Bot ๐ค ๐ฆ ๐
## About
Your friendly Semanticore Release bot helps maintaining the changelog for a project and automates the related tagging process.
## How to use it
Semanticore runs along every pipeline in the main branch, and will analyze the commit messages.
It maintains an open Merge Request for the project with all the required Changelog adjustments.
It detects the current version and suggests the next version based on the changes made.
Once a release commit is detected, it will automatically create the related Git tag on the next pipeline run.
## Conventions
* Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) so semanticore can decide whether a minor or patch level release is required.
* Releases are indicated with a commit with a commit messages which should match: `Release vX.Y.Z`
### Supported Commit Types
Currently Semanticore supports the following commit types:
| Type | Prefixes | Meaning |
|------------------|----------------------------|------------------------------------------|
| ๐ Feature | `feat` | New Feature, creates a minor commit |
| ๐จ Security Fix | `sec` | Security relevant change/fix |
| ๐พ Bugfix | `fix`, `bug` | Bugfix |
| ๐ก Test | `test` | (Unit-)Tests |
| ๐ Refactor | `refactor`, `rework` | Refactorings or reworking |
| ๐ค Devops/CI | `ops`, `ci`, `cd`, `build` | Operations, Build, CI/CD, Pipelines |
| ๐ Documentation | `doc` | Documentation |
| โก๏ธ Performance | `perf` | Performance improvements |
| ๐งน Chore | `chore`, `update` | Chores, (Dependency-)Updates |
| ๐ Other | everything else | Everything not matched by another prefix |
### Major versions
To enable support for major releases (breaking APIs), use the `-major` flag.
## Configuration
The `SEMANTICORE_TOKEN` is required - that's a Gitlab or Github Token which has basic contributor rights and allows to perform the related Git and API operations.
### Sign Key Configuration
To enable GPG signing of commits, you have two options:
- Use `SEMANTICORE_SIGN_KEY` environment variable containing the actual GPG private key
- Use `SEMANTICORE_SIGN_KEY_FILE` environment variable or the command line option `-sign-key-file`
specifying the path to a file containing the
GPG private key
If neither is provided, commits will not be signed.
### Set Author and committer
Semanticore respects [Git Environment variables](https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables)
* `GIT_AUTHOR_NAME`
* `GIT_AUTHOR_EMAIL`
* `GIT_COMMITTER_NAME`
* `GIT_COMMITTER_EMAIL`
The values can also be overridden by adding the appropriate flags. Run with `-help` to get the details.
If none of these is set, Semanticore will use `Semanticore Bot` as name and `semanticore@aoe.com` as E-Mail for Author and Committer.
## Using Semanticore
To test Semanticore locally you can run it without an API token to create an example Changelog:
```
go run github.com/aoepeople/semanticore@v0
```
### Example Configurations
#### Github Action
`.github/workflows/semanticore.yml`
```yaml
name: Semanticore
on:
push:
branches:
- main
jobs:
semanticore:
runs-on: ubuntu-latest
name: Semanticore
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.*'
- name: Semanticore
run: go run github.com/aoepeople/semanticore@v0
env:
SEMANTICORE_TOKEN: ${{secrets.GITHUB_TOKEN}}
GOTOOLCHAIN: auto
```
#### Gitlab CI
Create a secret `SEMANTICORE_TOKEN` containing an API token with `api` and `write_repository` scope.
`.gitlab-ci.yml`
```yaml
stages:
- semanticore
semanticore:
image: golang:1
stage: semanticore
variables:
GOTOOLCHAIN: auto
script:
- go run github.com/aoepeople/semanticore@v0
only:
- main
```
Make sure you set the repositories clone depth too a large enough value, the default of `50` might be too low.