diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 53796a4..43983fb 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -25,7 +25,7 @@ jobs: run: | set -euo pipefail subject="$(printf '%s' "${COMMIT_MESSAGE}" | sed -n '1p')" - if [ "${subject}" != "chore(npm): publish" ]; then + if [[ ! "${subject}" =~ ^chore\(npm\):\ publish(\ \(#[0-9]+\))?$ ]]; then echo "Refusing to publish from commit subject: ${subject}" exit 1 fi