I was looking into automating our release process with Actions and I am in a fix as to how I can best achieve a clean methodology. We want to make releases manually so something like Semantic Release is not going to be a good fit. As such I decided that we can create an action which creates a release and gets triggered when we want a release. The question was how to trigger this action.
For that, I went with creating a
VERSION file which just has the version string. The release action gets triggered only when this file changes which works well for now. But, creation of this file means that the version number is duplicated in this file and in the project’s native manifest file (like package.json, build.gradle etc). Here’s a few more ideas I have:
- I can remove the version information in such manifest files but there might be some framework which screams and throws a fit if I do so.
- I can put a fake value in the version field of these manifest files but this seems to uncomfortable hacky
- I can drop the
VERSIONfile idea and trigger the release action on change to the manifest file itself. Trouble is, that I can’t trigger the release everytime the manifest changes since it can change without the version information being changed like updation of dependencies. I would need to specifically check if the version field has changed. I would need to handle edge cases like the line number of the version field getting relocated elsewhere for which I would need to check against the same file with the previous version, etc.
The 3rd solution seems to me to be the most flexible but it needs some effort in getting right. I was looking for opinions and insights as to which of these ideas is the best or if there is an even better idea.