Is there a nice way to commit the changes file and create a tag in azure DevOps yaml based pipeline?
My scenario will be for a node js based build:
Each build, it will change the package.json version by using npm version patch
In the end, It will push the package.json to the build branch (Obviously with condition branch==master) and will tag and push a branch as well.
The dirty way can be:
- bash : |
git add filename.ext
git push origin HEAD:branchName
git tag -a tagName -m 'tag message'
git push --tags
displayName: 'Git Commit and Tag from pipeline'
