Skip to content

Latest commit

 

History

History
83 lines (65 loc) · 3.13 KB

README.md

File metadata and controls

83 lines (65 loc) · 3.13 KB

Conventional Commit Messages

Download Download Download

This GitHub Action consists of two major components:

It is possible to apply the following version scheme(s):

Usage

These are minimal examples; see the actions' respective documentation for more options and details.

Configuration

The commisery-action supports a configuration file, allowing you to:

  • Change which rules should be enabled for commit message validation
  • Add additional Conventional Commit types
  • Change the versioning strategy

Please refer to the documentation for more details

Conventional Commit message validation

The following example workflow will trigger on pull request creation/modification and verify all associated commit messages.

name: Commisery
on:
  pull_request:

jobs:
  commit-message:
    name: Conventional Commit compliance
    runs-on: ubuntu-latest

    steps:
      - name: Check for Conventional Commit compliance
        uses: tomtom-international/commisery-action@v2
        with:
          token: ${{ github.token }}

See the documentation for more information and all possible options for commit message validation.

Bump

The following bumps the version according to the Conventional Commits between HEAD and the latest SemVer tag (granted one is present).

name: Bump version
on:
  push:
    branches: [ main ]

jobs:
  bump-version:
    name: Bump version and release
    runs-on: ubuntu-latest

    steps:
      - name: Release version
        id: release-version
        uses: tomtom-international/commisery-action/bump@v2
        with:
          token: ${{ github.token }}
          create-release: true              # OPTIONAL, default: `false`
          create-release: false             # OPTIONAL, default: `false`
      - run: echo "Current version is ${{steps.release-version.outputs.current-version}}"
      - if: steps.release-version.outputs.next-version != ''
        run: echo "Version bumped to ${{steps.release-version.outputs.next-version}}"

More info on the bump action and the available options here

Command-line Interface

You can find more information on how to use the CLI on the dedicated page