Hi Viktor,
I know it’s an old thread, but I’m running into an issue …
Before reading your post I had my deploy workflow bumping the version of our project, tagging VCS, and pushing the new commit (using [skip ci
] to avoid another build). But as I updated master to be a protected branch, I ran into issues, and plus, I would rather not have the deploy workflow incrementing the version for each deploy in case I want to deploy multiple times from master for different environments and keep the version consistent for each release.
After reading your post, I took your suggestion and changed my PR workflow to be the workflow that bumps the version. So I made a PR, it kicked off our “build” workflow, which would bump the version as part of the workflow (amend commit the previous commit with the new version and [skip ci]
added), and push the changes. It entered into an endless cycle as the [skip ci] had no impact. I then read your post here, and the docs here, and understood that skipping PRs depend on the title including the [skip ci]
, not the commit itself.
But changing the PR title is not something that can be done in the workflow (unless I hook into the GitHub API), because the moment [skip ci]
is added, I’ve disabled the ability to auto kickoff a bitrise build by pushing any potential changes needed for that said PR. Is adding [skip ci]
in the PR title only for the purpose of developers wanting to make PRs that don’t kick off a build cycle? Or is it meant to be used in some way by the workflows of the CI?
By the way, our project is a react native project, which is using npm version
to increment the package.json, which has a postversion
script to run a react native package (react-native-version) which updates the iOS and Android versions and build numbers to keep everything aligned. This is all happening currently in the bitrise workflow.
What would you suggest here? You wrote in another post that normally you would keep the incrementing of version numbers separate from the CI process and have it as part of any other change in the code base, but I’m wondering if there is a best practice for bumping versions within PR workflows and pushing the changes?
Thanks you so much!