GitHub action for Semantic Versioning and Releasing following Conventional Commit standard.
The action automatically computes the new version tag from commits and performs the release on the repository
This action requires a Personal Access Token with permission to push into the repository. You can pass it to the action as follow:
- name: semver
uses: anitvam/conventionalcommit-semantic-releasing@<latest-version>
with:
token: ${{ secrets.PERSONAL_TOKEN }}| parameter | description | default value | required |
|---|---|---|---|
token |
Personal Access token with push permissions on repository |
none | true |
publish-command |
A custom shell command executed during the publication of the new version |
"" |
false |
assets-path |
The path that will be loaded into release assets | "assets/**" |
false |
The action by default includes inside the new release's assets all the files that are present in a folder named assets/
The action performs the release on the repository's main/master branch.
The action publishes releases under the name v<MAJOR>.<MINOR>.<PATCH>.
Versions are computed by default from the action when one of the conventional-commit keyworda is found inside the commit description.
In particular:
- A commit with
feat:will trigger the next release with theMINORversion number increased. - A commit with
fix:will trigger the next release with thePATCHversion number increased. - A commit with
feat!:(or withBREAKING CHANGE!in the commit body) will trigger the next release with theMAJORversion number increased.
With the first feat pushed inside the repository, the action will generate version v1.0.0.
If you want to follow the ZeroVer standard, you can publish manually the tag v0.1.0 with the repository's initial commit and with the first pushed feat commit the release will be automatically attached to this tag.
You can publish the tag using:
$ git tag -a v0.1.0 -m "Version v0.1.0"
$ git push origin v0.1.0