diff --git a/action.yml b/action.yml index 87682af..521b253 100644 --- a/action.yml +++ b/action.yml @@ -72,6 +72,17 @@ inputs: description: "Manually specify the desired increment" required: false check_consistency: - default: false + default: 'false' description: "check consistency among versions defined in commitizen configuration and version_files" required: false + gpg_sign: + description: > + If true, use GPG to sign commits and tags (for git operations). Requires separate + setup of GPG key and passphrase in GitHub Actions (e.g. with the action + crazy-max/ghaction-import-gpg) + required: false + default: "false" + debug: + description: "If true, prints debug output to GitHub Actions stdout." + required: false + default: "false" diff --git a/entrypoint.sh b/entrypoint.sh index fb5979e..af63f3e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash set -e +gpg --version + if [[ -z $INPUT_GITHUB_TOKEN ]]; then echo 'Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".' >&2 exit 1 @@ -29,10 +31,16 @@ echo "Commitizen version: $(cz version)" PREV_REV="$(cz version --project)" CZ_CMD=('cz') +if [[ $INPUT_DEBUG == 'true' ]]; then + CZ_CMD+=('--debug') +fi if [[ $INPUT_NO_RAISE ]]; then CZ_CMD+=('--no-raise' "$INPUT_NO_RAISE") fi CZ_CMD+=('bump' '--yes') +if [[ $INPUT_GPG_SIGN == 'true' ]]; then + CZ_CMD+=('--gpg-sign') +fi if [[ $INPUT_DRY_RUN == 'true' ]]; then CZ_CMD+=('--dry-run') fi