message: hammer: Update changelog workflow
diff: @@ -2,12 +2,8 @@ name: changelog generation
  # Only trigger on pull request closed events
  on:
  - workflow_dispatch:
  pull_request:
  types: [closed]
  - create:
  - tags:
  - - '*'
  jobs:
  debug:
  runs-on: ubuntu-latest
  @@ -15,7 +11,7 @@ jobs:
  - uses: hmarr/debug-action@v2
  changelog:
  # This job will only run if a PR has been merged or a tag has been created
  - if: ${{ github.event.ref_type == 'tag' || (github.event.pull_request && github.event.pull_request.merged == true) }}
  + if: ${{ github.base_ref == 'v4/release' && github.event.pull_request && github.event.pull_request.merged == true }}
  runs-on: ubuntu-latest
  steps:
  - name: Checking out repository
  @@ -24,10 +20,10 @@ jobs:
  fetch-depth: '0'
  - name: Generating changelog
  env:
  - REF: ${{ github.event.ref }}
  + BASE_REF: ${{ github.base_ref }}
  run: |
  # Get the originating branch
  - BRANCH=$(git branch -r --contains $REF | sed "s/^\s*origin\///")
  + BRANCH=$(git branch -r --contains $BASE_REF | sed "s/^\s*origin\///")
  git checkout $BRANCH
  npm i
  node bin/changelog
  