Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
@latest
version in all tools installed from GH releasesCloses #1
Closes #5
Closes #25
TODO:
should we use sha256 or sha512/256 instead of sha512 to reduce the size of the manifest files?UPD: Changed to use sha256 as it seems to reduce the overall size of the manifest by almost half.UPDATE: manifest size issue is currently tracked by #36.
Details
This switches package info management from code in shellscript to JSON manifest. The following is an example of the manifest:
install-action/manifests/mdbook.json
Lines 2 to 20 in f30d182
These manifests are generated by a manifest generator written in Rust. The generator uses base package info like the following, fetches Release info from GitHub API, finds releases that include specified assets, downloads assets, gets SHA256 checksums, and dumps these info as manifests.
install-action/tools/codegen/base/mdbook.json
Lines 1 to 14 in f30d182
Multiple asset name patterns can be specified, and if no assets match the first pattern, check the second pattern. So it works well even if the asset name changes in a new release (just insert the new asset name to the front of the asset name list). The following is the case of cross, which changed asset names in 0.2.2.
install-action/tools/codegen/base/cross.json
Lines 4 to 7 in f30d182
install-action/manifests/cross.json
Lines 62 to 91 in f30d182
The generator is run regularly in CI, and a PR is created if there is a release that does not yet exist in the manifest.