perf: add cache-build option and upgrade to v6.2.0

Add `cache-build` input (default: false) to control whether GOCACHE is
included in the cache. This dramatically reduces cache size from ~1.2GB
to ~200-400MB by excluding build artifacts that have low reuse across
code changes.

Also upgrades dependencies (@actions/cache v5, semver v7.7) and runtime
to node24 to align with upstream actions/setup-go.

https://claude.ai/code/session_01CqrWSjzGgd7Zi6LyJkd9XW
This commit is contained in:
Claude 2026-04-04 17:58:19 +00:00
parent f21630a9ad
commit cf0b11600c
No known key found for this signature in database
9 changed files with 198948 additions and 67104 deletions

View file

@ -1,6 +1,6 @@
{
"name": "setup-go",
"version": "5.0.0",
"version": "6.2.0",
"private": true,
"description": "setup go action",
"main": "lib/setup-go.js",
@ -25,18 +25,18 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^4.0.3",
"@actions/cache": "^5.0.1",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/glob": "^0.5.0",
"@actions/http-client": "^2.2.1",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^2.0.1",
"semver": "^7.6.3"
"@actions/tool-cache": "^2.0.2",
"semver": "^7.7.3"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^20.11.28",
"@types/node": "^22.15.3",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1",