Replace Cargo.toml parsing with cargo metadata, use output variables, auto-include metadata files#4
Conversation
…e Windows .rc generation Co-authored-by: julcst <97609514+julcst@users.noreply.github.com>
Co-authored-by: julcst <97609514+julcst@users.noreply.github.com>
Co-authored-by: julcst <97609514+julcst@users.noreply.github.com>
|
@copilot you do not need to check for a cargo.toml, cargo metadata already does that. Furthermore, you do not need to ship the Windows icon file in the zip distribution. However, maybe include an example buildscript using winres and icon conversion in the hello world example. Just keep both out of the post build shell script. Also document the dependencies of the action. |
Co-authored-by: julcst <97609514+julcst@users.noreply.github.com>
Done in commit 19d0d52:
|
|
@copilot please use winres by adding it to the toml of hello-world. And please use the include field from the toml instead. Also include the README and LICENSE from the readme and license_path field of the metadata |
…adata Co-authored-by: julcst <97609514+julcst@users.noreply.github.com>
Done in commit a7e54c8:
|
Addresses technical debt around metadata extraction, deterministic file discovery, and Windows resource handling. Moves Windows metadata/icon embedding to pre-build phase as recommended practice. Automatically includes README and LICENSE files from cargo metadata.
Changes
Metadata extraction
cargo metadataJSON output parsed via jqreadmeandlicense_filemetadata fields in all bundlesTest workflow improvements
bundle-path,bundle-name) instead of hardcoded pathsWindows metadata/icon handling
build.rswinrescrate inbuild.rsExample improvements
winres = "0.1"to hello-world[build-dependencies]in Cargo.tomlbuild.rsto use winres by default (enabled, not commented out)readmeandlicense-filefields in hello-world Cargo.tomlDocumentation
cargoandjqare required for metadata extractionCargo.tomlincludefield vs actioninclude-filesparametercargo metadatausageCleanup
convert_png_to_icoanddiscover_cargo_tomlfunctionsworking-directoryparameterOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.