{{ message }}
How to keep version numbers in sync across many files in a project? #208018
Answered
by
kittimzhe
blackears
asked this question in
Programming Help
Replies: 3 comments
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as low quality.
This comment was marked as low quality.
0 replies
Answer selected by
blackears
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hi @blackears 👋
The principle is a single source of truth (as the earlier reply said), but let me make it concrete for your exact setup — version in GitHub Actions workflows + two
.cfgfiles + script files.1. For GitHub Actions — don't store the version in the workflow at all. Trigger releases from a git tag and read the version from the tag, so the workflow never needs editing per release:
Then reference
${{ env.VERSION }}(or${{ github.ref_name }}) anywhere a step needs the number. Tagv1.2.3→ version…