Previously, I have been manually updating the version by:
Merge PR.
Commit to master with changes to version, CHANGELOG, and Helm chart versions.
Create a Github Release with a new version tag in format "v2.0.0-rc.34".
Expect on-release action to launch and pass.
Automated Method
However, there exists conflicting functionality in Github Actions to make automated updates to these files from the version tag. This means that the workflow is assumed to be instead:
Merge PR.
Create Github Release with a new version tag.
Expect on-release action to launch and pass. This action updates the versions in files.
The apparent outcome is that the files are updated with the appropriate version, however the tag still points to the original commit. When users pull the latest version, the versioning will not match.
In reality, the Github Action is failing when attempting to commit the changes. Complains of missing branch master.
This error doesn't occur in Manual Method because no automated changes were needed because the correct versions were already updated, therefore nothing to commit.
Change in Workflow
The workflow is documented in RELEASE.md.
Instead of automated file changes, the workflow should take the role of checking version state and allow the developer to make changes if anything fails.
This check happens in new script ./check-version.sh. It obtains the latest git tag and compares it against the versions inside files.
The script ./check-version.sh is added to both on-pull-request and on-release actions to ensure consistency during PR development and at release time.
Workflow:
Follow "Manual Method" above.
Instead of manually updating files, you may use helper script ./update-version.sh <version> to update the required files with the new version.
Expect on-release action to launch and pass.
The Docker and Helm resources are published only if on-release passes.
Simplify the version update workflow.
Original Workflow
Manual Method
Previously, I have been manually updating the version by:
master
with changes toversion
,CHANGELOG
, and Helm chart versions.on-release
action to launch and pass.Automated Method
However, there exists conflicting functionality in Github Actions to make automated updates to these files from the version tag. This means that the workflow is assumed to be instead:
on-release
action to launch and pass. This action updates the versions in files.The apparent outcome is that the files are updated with the appropriate version, however the tag still points to the original commit. When users pull the latest version, the versioning will not match.
In reality, the Github Action is failing when attempting to commit the changes. Complains of missing branch
master
.This error doesn't occur in Manual Method because no automated changes were needed because the correct versions were already updated, therefore nothing to commit.
Change in Workflow
The workflow is documented in
RELEASE.md
.Instead of automated file changes, the workflow should take the role of checking version state and allow the developer to make changes if anything fails.
This check happens in new script
./check-version.sh
. It obtains the latest git tag and compares it against the versions inside files.The script
./check-version.sh
is added to bothon-pull-request
andon-release
actions to ensure consistency during PR development and at release time.Workflow:
./update-version.sh <version>
to update the required files with the new version.on-release
action to launch and pass.The Docker and Helm resources are published only if
on-release
passes.