The GITHUB_RUN_NUMBER is currently a nice way of having a build number on your builds. I’m using it to build up a semver like 1.2.3-alpha.{number}
. Unfortunately this number resets if you change the workflow name and in some other scenarios.
This can lead to an issue if you deploy your package to registries like npmjs.com. It would be great if we can manually set the new value of GITHUB_RUN_NUMBER within the repository. I could bump it again from 1 to the number I had before renaming my workflow file.
Another use case is if I bump my version to 1.2.4 I want to start again with alpha.1
. Many CI servers expose this build number/counter and it can be reset manually if needed. GitHub actions seems to be missing this feature so far.
Is there maybe a workaround for this? I would like to avoid spoiling my Git history with constant version bumps from the CI environment just to update the build version within my package.json.