From 4e1728ecc759e4ee8d733334d23bc144c5f2877d Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 1 Dec 2022 09:03:07 +0100 Subject: [PATCH] ci: update workflows for nodejs projects (#160) --- .github/workflows/if-nodejs-release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 948edb8..73bffb0 100644 --- a/.github/workflows/if-nodejs-release.yml +++ b/.github/workflows/if-nodejs-release.yml @@ -19,6 +19,15 @@ on: jobs: test-nodejs: + # We just check the message of first commit as there is always just one commit because we squash into one before merging + # "commits" contains array of objects where one of the properties is commit "message" + # Release workflow will be skipped if release conventional commits are not used + if: | + startsWith( github.repository, 'asyncapi/' ) && + (startsWith( github.event.commits[0].message , 'fix:' ) || + startsWith( github.event.commits[0].message, 'fix!:' ) || + startsWith( github.event.commits[0].message, 'feat:' ) || + startsWith( github.event.commits[0].message, 'feat!:' )) name: Test NodeJS release on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: