0

I generate an changelog based on my commit history using standard-version.
This are my azure pipeline steps to generate the changelog:

 git checkout -b $(Build.SourceBranchName)
    npm run release
    git push --follow-tags origin HEAD:$(Build.SourceBranchName)

The npm run release script does this:

standard-version --skip-commit

It works how it supposed to, the changelog is generated and committed. My problem is that the pipeline reruns when the changelog and the package.json file are commited.I added these files to trigger excludes:

   exclude:
          - CHANGELOG.md
          - README.md
          - package.json
          - package-lock.json

but i wondered if there is a cleaner solution

GoldJns
  • 21
  • 4
  • You can add `[skip ci]` to the commit message: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#skipping-ci-for-individual-pushes – jessehouwing May 05 '23 at 16:30
  • Or use a specific username in your git coonfig for this xommit and put a `condition` on the workflow job to not trigger when the last commit is made by that user. – jessehouwing May 05 '23 at 16:37
  • ok i get it, the flag will prevent the pipeline to run again. But im also pushing the tags, will this trigger a rerun? Thanks in advance – GoldJns May 13 '23 at 15:34
  • If you have a trigger on tag, then yes, the pipeline wil re-run against the task. – jessehouwing May 13 '23 at 19:05

0 Answers0