This pull request introduces an automated version update mechanism to enhance version management in the project. The key changes include:
Addition of scripts/update-version.sh to automate updating the version in package.json.
Enhancement of the GitHub workflow (release.yml) to incorporate the new script for version management.
Ensuring the updated version is correctly passed from the build job to the publish job.
Details of Changes
scripts/update-version.sh
A new executable script, scripts/update-version.sh, has been added to facilitate automated version updates. This script accepts the following arguments:
If no argument is provided, it defaults to updating the patch version.
If major, minor, or patch is provided, it updates the respective version accordingly.
Alternatively, it accepts version numbers in the format x, x.x, or x.x.x (e.g., 1, 1.1, 1.0.1).
GitHub Workflow Changes
The .github/workflows/release.yml workflow has been updated to leverage the new version update script. Notable changes include:
Integration of the update-version step to execute the script and obtain the updated version.
Modification of steps to ensure the correct version is utilized throughout the workflow.
For the first run of the workflow, it is recommended to set a fixed version, as the initial version is currently 0.0.0. This can be achieved by utilizing the workflow input (e.g. 0.0.29, or 0.1.0).
Summary of Changes
This pull request introduces an automated version update mechanism to enhance version management in the project. The key changes include:
scripts/update-version.sh
to automate updating the version inpackage.json
.release.yml
) to incorporate the new script for version management.Details of Changes
scripts/update-version.sh
A new executable script,
scripts/update-version.sh
, has been added to facilitate automated version updates. This script accepts the following arguments:major
,minor
, orpatch
is provided, it updates the respective version accordingly.x
,x.x
, orx.x.x
(e.g.,1
,1.1
,1.0.1
).GitHub Workflow Changes
The
.github/workflows/release.yml
workflow has been updated to leverage the new version update script. Notable changes include:update-version
step to execute the script and obtain the updated version.