This Github action creates a new Github Release and tags your commits, using Semantic Versioning and Conventional Commits.
See get-newVersion for details on versioning rules.
It is recommended to set the pull request policy of your repository to Default to pull request title and commit details in the Settings/General page of your repository.
The new version will default to 0.1.0
.
This action uses Github CLI and needs not to checkout the repository.
The release will autogenerate the notes, tag the source code, and include source archives to the release by default.
You can add additional files using the pattern
input variable.
This pattern matches the syntax for gh release create
command.
- Pattern
-
Optional. Files to include in the GitHub release. The release will always include a source code archive.
- Allow-additional-modifiers
-
Optional. Set to
true
to support using additional modifiers+
and-
for minor and patch level updates respectively. Also supports usingNEW FEATURE:
footer for minor updates. See below for details on the feat: dispute. - Feat-upgrades-minor
-
Optional. Set to
false
to increment a patch bump instead of a minor one when the commit type isfeat:
. See below for details on the feat: dispute. - Strict-types
-
Optional. Set to
true
to fail this action when the commit type is not in the following list:build
,chore
,ci
,docs
,feat
,fix
,perf
,refactor
,revert
,style
,test
.
- Current-version
-
Current version found in the repository, format
1.2.3
. - Bump-type
-
Type of version bumping, one of the following:
major
,minor
,patch
. - Next-version
-
Version number for the new release, format
1.2.3
.
This action will create a release with artifacts for each commit on the master branch :
on:
push:
branches: [main]
jobs:
# insert another job that will build and upload some artifacts
publish:
runs-on: ubuntu-latest
name: 'Publish a new release'
steps:
- uses: actions/download-artifact@v2
with:
name: my-artifact
path: artifacts
- uses: arwynfr/actions-conventional-versioning@v3
with:
pattern: artifacts/*
allow-additional-modifiers: true
feat-upgrades-minor: false
strict-types: true
- get-newVersion
-
Calculates the new version number without creating a Release. Usefull before build if you want to embed the new version number in the sources. This action replaces obsolete
whatif
input parameter. - new-versionTags
-
Adds major (
v1
) and minor (v1.2
) tags to the repository. Usefull with GitHub actions, or any situation when you want to allow other repositories to reference the "latest" version of a given major or minor version.
Important
|
There is a dispute in the community as to whether using a The official position of Conventional Commits is that adding features to your code base should use My personnal opinion is that adding features to a service does not automatically imply changes to the public API. I think developpers should use the After a short time of indecision as to whether this project should follow the conventional commits standard or fork from it, I decided to do both :
This is why we introduced the concept of additional modifiers, namely
|
You can share your thoughts on this issue: conventional-commits/conventionalcommits.org#528