Default Workflows
Knope can do a lot out of the box, with no need for a config file. If no file is found, Knope will use the same config as it would create with knope --generate
.
If you have a knope.toml
file in your project, this page is no longer relevant to you, as default workflows are only used when no config file is found.
release
Without any config, you can run knope release
to create a new release from conventional commits. This will:
- Update the version in any supported package files based on the semantic version determined from all commits since the last release. For more detail, see the
PrepareRelease
step. - Update a
CHANGELOG.md
file (if any) with the body of relevant commits (again, see thePrepareRelease
step for more detail). - Commit the changes to the versioned and changelog files and push that commit.
- Create a release which is one of the following, see the
Release
step for more detail:- If your remote is GitHub, create a new release on GitHub with the same body as the changelog entry. This requires a
GITHUB_TOKEN
environment variable to be set. - If the remote is not GitHub, a tag will be created and pushed to the remote.
- If your remote is GitHub, create a new release on GitHub with the same body as the changelog entry. This requires a
Additional Options
--dry-run
will run the workflow without modifying any files or interacting with the remote. Instead, all the steps that would happen will be printed to the screen so you can verify what will happen.--prerelease-label
will tellknope
to create a prerelease with a given label. For example,knope release --prerelease-label rc
will create a release with the next calculated version (as if you had runknope release
), but with the-rc.0
suffix (orrc.1
,rc.2
, etc. if you have already created a release with that label).--override-version
will tellknope
to use a specific version instead of calculating the next one. For example,knope release --override-version 1.2.3
will create a release with the version1.2.3
. This is especially useful when moving from a0.x.x
version to1.0.0
.
document-change
Without any config, you can run knope document-change
to run the CreateChangeFile
step. Because there is only one package configured by default, this step will be skipped and a special, default package will be used.
Additional Options
--dry-run
will run the workflow without modifying any files or interacting with the remote. Instead, all the steps that would happen will be printed to the screen so you can verify what will happen.