open-ephys / onix-bonsai-onix1

Bonsai library for the Open Ephys Onix Acquisition System
https://open-ephys.github.io/onix1-bonsai-docs
MIT License
4 stars 3 forks source link

Add a step to check for semantic version increase in actions #250

Closed bparks13 closed 2 weeks ago

bparks13 commented 3 weeks ago

Due to how pre-releases are categorized in semantic versioning, for us to easily test CI builds after a new release is published we need to remember to increase the semantic version in some way (it can be a patch version increase if needed) so that the CI pre-releases can be installed on top of the full release.

To remove the need to remember this, we can add a step in the Github actions that compares the version number of the current branch to the most recent release and blocks merging a PR unless the version is increased.

This can be done in a number of ways, but one possibility is as follows:

This will only check that the major/minor/patch version is increased in some way, since we are utilizing CI pre-release builds in the actions there should not be any conflict with package creation, nor should it interfere with the next release version.

We can also configure it to block the PR but not block subsequent jobs so that the remaining checks run, in case there are other issues that need to be addressed.

jonnew commented 2 weeks ago

We discussed during our meeting. I like this. The only thing we came up with is not relying on the tag to create a more recent version to compare against because the tag does not need to be a well formed version number or be incremented correctly etc. We need some way of comparing against an actual previous version rather than the tag which is supposed to be reflection of that, but its not guaranteed.

bparks13 commented 2 weeks ago

We also decided that the package should never be created if the version number is not increased in some way.