mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-09-29 12:07:05 -07:00
43d4978f4d8f0a5072ace647f9277c83d095b1bb
cliVersion defaults to 'latest', and caching was previously skipped entirely for it - only pinned versions (cliVersion: v0.1.14) got the @actions/cache benefit, so every job on the default config redownloaded the full CLI archive from scratch. Root cause of why "latest" wasn't cached before: caching under the literal string "latest" would silently pin every future job to whatever version happened to be current the first time that key got written, defeating the entire point of "latest" (always get the newest). Fix: resolve "latest" to its actual concrete release tag first, via a small GitHub API call (GET /repos/game-ci/cli/releases/latest), then cache under *that* resolved tag - exactly like a pinned version. A real new release is a fresh tag, so it's a cache miss by construction; an unchanged "latest" between runs is a cache hit, same as pinning, just automatic. Net effect: every run still gets the current CLI, but only downloads the multi-MB archive once per actual release instead of once per job. Verification: - yarn typecheck: clean. - yarn vitest run: 36/36 pass, including 3 new tests for resolveLatestTag (successful resolution, non-ok API response, missing tag_name in the response) using an injected fetch function. - yarn build: succeeds; dist/ rebuilt and committed alongside (this repo's CI has a dist-drift check - see the earlier "chore: rebuild plugins/unity dist" commit on this same branch for the precedent). - oxfmt --check: clean.
Unity - Builder
(Not affiliated with Unity Technologies)
GitHub Action to build Unity projects for different platforms.
Part of the GameCI open source project.
How to use
Find the docs on the GameCI documentation website.
Related actions
Visit the GameCI Unity Actions status repository for related Actions.
Community
Feel free to join us on
and engage with the community.
Contributing
To help improve the documentation, please find the docs repository.
To contribute to Unity Builder, kindly read the contribution guide.
Support us
GameCI is free for everyone forever.
You can support us at OpenCollective.
Licence
This repository is MIT licensed.
This includes all contributions from the community.
Languages
TypeScript
95.5%
JavaScript
3.6%
Shell
0.9%