diff --git a/.github/workflows/if-nodejs-release.yml b/.github/workflows/if-nodejs-release.yml index 948edb89..73bffb04 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: