Skip to content

Allows semantic-release to be run from non-node projects where pre-commit is installed.

License

Notifications You must be signed in to change notification settings

joberstein/precommit-semantic-release

Repository files navigation

precommit-semantic-release

This pre-commit hook allows semantic-release to be run from non-node projects where pre-commit is installed.

Configuration

  1. Create your .releaserc config file in the repo's root, as explained in semantic-release docs.

  2. Add the following to your repo's .pre-commit-config.yaml, adding any required plugins as additional_dependencies or args:

    -   repo: https://github.com/joberstein/precommit-semantic-release
        rev: <latest tag>
        hooks:
            -   id: semantic-release 
                stages:
                    - manual
                additional_dependencies:
                    - @semantic-release/exec
                args: 
                    - -d
                    - --branches=test
    

Installation

Install the hook in your project repo:

pre-commit install

Run

Run the hook in your CI configuration or on the command-line as a manual hook:

pre-commit run --hook-stage manual semantic-release

About

Allows semantic-release to be run from non-node projects where pre-commit is installed.

Resources

License

Stars

Watchers

Forks

Packages

No packages published