mirror of
				https://github.com/chickensoft-games/setup-godot.git
				synced 2025-10-31 15:33:55 +00:00 
			
		
		
		
	Upgrade from node16 to node20 (#81)
This commit is contained in:
		
							parent
							
								
									1dc3741f47
								
							
						
					
					
						commit
						d83cb325fa
					
				
							
								
								
									
										14
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @ -35,10 +35,10 @@ jobs: | ||||
|         # Use bash shells on all platforms. | ||||
|         shell: bash | ||||
|     steps: | ||||
|       - uses: actions/checkout@v3 | ||||
|       - uses: actions/checkout@v4 | ||||
|         name: 🧾 Checkout | ||||
| 
 | ||||
|       - uses: actions/setup-dotnet@v3 | ||||
|       - uses: actions/setup-dotnet@v4 | ||||
|         if: ${{ matrix.use-dotnet }} | ||||
|         name: 💽 Setup .NET SDK | ||||
|         with: | ||||
| @ -67,7 +67,7 @@ jobs: | ||||
|     if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v3 | ||||
|       - uses: actions/checkout@v4 | ||||
|         name: 🧾 Checkout | ||||
| 
 | ||||
|       - uses: ./ | ||||
| @ -85,12 +85,12 @@ jobs: | ||||
|     runs-on: ubuntu-latest | ||||
| 
 | ||||
|     steps: | ||||
|       - uses: actions/checkout@v3 | ||||
|       - uses: actions/checkout@v4 | ||||
| 
 | ||||
|       - name: Set Node.js 16.x | ||||
|         uses: actions/setup-node@v3 | ||||
|       - name: Set Node.js 20.x | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 16.x | ||||
|           node-version: 20.x | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: npm ci | ||||
|  | ||||
| @ -67,5 +67,5 @@ inputs: | ||||
|       True will also download the Godot Export Templates for each platform. | ||||
|     default: false | ||||
| runs: | ||||
|   using: 'node16' | ||||
|   using: 'node20' | ||||
|   main: 'dist/index.js' | ||||
|  | ||||
							
								
								
									
										18
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -91,9 +91,15 @@ function run(platform) { | ||||
|         const godotDownloadPath = path_1.default.join(downloadsDir, `${versionName}.zip`); | ||||
|         const godotInstallationPath = platform.getUnzippedPath(installationDir, versionName, useDotnet); | ||||
|         const binDir = path_1.default.join(userDir, binRelativePath); | ||||
|         const exportTemplateUrl = includeTemplates ? (0, utils_1.getGodotUrl)(version, platform, useDotnet, true) : ''; | ||||
|         const exportTemplatePath = includeTemplates ? (0, utils_1.getExportTemplatePath)(version, platform, useDotnet) : ''; | ||||
|         const exportTemplateDownloadPath = includeTemplates ? path_1.default.join(downloadsDir, 'export_templates.zip') : ''; | ||||
|         const exportTemplateUrl = includeTemplates | ||||
|             ? (0, utils_1.getGodotUrl)(version, platform, useDotnet, true) | ||||
|             : ''; | ||||
|         const exportTemplatePath = includeTemplates | ||||
|             ? (0, utils_1.getExportTemplatePath)(version, platform, useDotnet) | ||||
|             : ''; | ||||
|         const exportTemplateDownloadPath = includeTemplates | ||||
|             ? path_1.default.join(downloadsDir, 'export_templates.zip') | ||||
|             : ''; | ||||
|         core.info(`🤖 Godot version: ${version}`); | ||||
|         core.info(`🤖 Godot version name: ${versionName}`); | ||||
|         core.info(`🟣 Use .NET: ${useDotnet}`); | ||||
| @ -124,8 +130,10 @@ function run(platform) { | ||||
|             core.endGroup(); | ||||
|             // See if Godot is already installed.
 | ||||
|             core.startGroup(`🤔 Checking if Godot is already in cache...`); | ||||
|             const cachedPaths = includeTemplates ? [godotInstallationPath, exportTemplatePath] : [godotInstallationPath]; | ||||
|             const cacheKey = includeTemplates ? godotUrl : godotUrl + '-no-templates'; | ||||
|             const cachedPaths = includeTemplates | ||||
|                 ? [godotInstallationPath, exportTemplatePath] | ||||
|                 : [godotInstallationPath]; | ||||
|             const cacheKey = includeTemplates ? godotUrl : `${godotUrl}-no-templates`; | ||||
|             const cached = yield cache.restoreCache(cachedPaths.slice(), cacheKey); | ||||
|             let executables; | ||||
|             if (!cached) { | ||||
|  | ||||
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										40
									
								
								src/main.ts
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								src/main.ts
									
									
									
									
									
								
							| @ -75,12 +75,15 @@ async function run(platform: Platform): Promise<void> { | ||||
|   ) | ||||
|   const binDir = path.join(userDir, binRelativePath) | ||||
| 
 | ||||
|   const exportTemplateUrl = includeTemplates ? getGodotUrl(version, platform, useDotnet, true) : '' | ||||
|   const exportTemplatePath = includeTemplates ? getExportTemplatePath(version, platform, useDotnet) : '' | ||||
|   const exportTemplateDownloadPath = includeTemplates ? path.join( | ||||
|     downloadsDir, | ||||
|     'export_templates.zip' | ||||
|   ) : '' | ||||
|   const exportTemplateUrl = includeTemplates | ||||
|     ? getGodotUrl(version, platform, useDotnet, true) | ||||
|     : '' | ||||
|   const exportTemplatePath = includeTemplates | ||||
|     ? getExportTemplatePath(version, platform, useDotnet) | ||||
|     : '' | ||||
|   const exportTemplateDownloadPath = includeTemplates | ||||
|     ? path.join(downloadsDir, 'export_templates.zip') | ||||
|     : '' | ||||
| 
 | ||||
|   core.info(`🤖 Godot version: ${version}`) | ||||
|   core.info(`🤖 Godot version name: ${versionName}`) | ||||
| @ -91,7 +94,7 @@ async function run(platform: Platform): Promise<void> { | ||||
|   core.info(`📥 Godot download path: ${godotDownloadPath}`) | ||||
|   core.info(`📦 Godot installation directory: ${installationDir}`) | ||||
|   core.info(`🤖 Godot installation path: ${godotInstallationPath}`) | ||||
|    | ||||
| 
 | ||||
|   if (includeTemplates) { | ||||
|     core.info(`🤖 Export Template url: ${exportTemplateUrl}`) | ||||
|     core.info(`📥 Export Template download path: ${exportTemplateDownloadPath}`) | ||||
| @ -99,7 +102,7 @@ async function run(platform: Platform): Promise<void> { | ||||
|   } else { | ||||
|     core.info(`⏭️ Skipping Export Templates.`) | ||||
|   } | ||||
|    | ||||
| 
 | ||||
|   core.info(`📂 Bin directory: ${binDir}`) | ||||
|   core.info(`🤖 GodotSharp release: ${godotSharpRelease}`) | ||||
|   core.endGroup() | ||||
| @ -115,13 +118,12 @@ async function run(platform: Platform): Promise<void> { | ||||
| 
 | ||||
|     // See if Godot is already installed.
 | ||||
|     core.startGroup(`🤔 Checking if Godot is already in cache...`) | ||||
|      | ||||
|     const cachedPaths = includeTemplates ? [ godotInstallationPath, exportTemplatePath] : [ godotInstallationPath ] | ||||
|     const cacheKey = includeTemplates ? godotUrl : godotUrl + '-no-templates' | ||||
|     const cached = await cache.restoreCache( | ||||
|       cachedPaths.slice(), | ||||
|       cacheKey | ||||
|     ) | ||||
| 
 | ||||
|     const cachedPaths = includeTemplates | ||||
|       ? [godotInstallationPath, exportTemplatePath] | ||||
|       : [godotInstallationPath] | ||||
|     const cacheKey = includeTemplates ? godotUrl : `${godotUrl}-no-templates` | ||||
|     const cached = await cache.restoreCache(cachedPaths.slice(), cacheKey) | ||||
| 
 | ||||
|     let executables: string[] | ||||
|     if (!cached) { | ||||
| @ -141,7 +143,6 @@ async function run(platform: Platform): Promise<void> { | ||||
|       core.info(`✅ Godot downloaded to ${godotDownloadedPath}`) | ||||
|       core.endGroup() | ||||
| 
 | ||||
| 
 | ||||
|       // Extract Godot
 | ||||
|       core.startGroup(`📦 Extracting Godot to ${installationDir}...`) | ||||
| 
 | ||||
| @ -166,7 +167,6 @@ async function run(platform: Platform): Promise<void> { | ||||
|       core.info(`✅ Files shown`) | ||||
|       core.endGroup() | ||||
| 
 | ||||
| 
 | ||||
|       if (includeTemplates) { | ||||
|         core.startGroup( | ||||
|           `📥 Downloading Export Templates to ${exportTemplateDownloadPath}...` | ||||
| @ -183,7 +183,6 @@ async function run(platform: Platform): Promise<void> { | ||||
|         core.info(`✅ Export Templates downloaded to ${templateDownloadedPath}`) | ||||
|         core.endGroup() | ||||
| 
 | ||||
| 
 | ||||
|         core.startGroup( | ||||
|           `📦 Extracting Export Templates to ${exportTemplatePath}...` | ||||
|         ) | ||||
| @ -220,10 +219,7 @@ async function run(platform: Platform): Promise<void> { | ||||
| 
 | ||||
|       // Save extracted Godot contents to cache
 | ||||
|       core.startGroup(`💾 Saving extracted Godot download to cache...`) | ||||
|       await cache.saveCache( | ||||
|         cachedPaths, | ||||
|         cacheKey | ||||
|       ) | ||||
|       await cache.saveCache(cachedPaths, cacheKey) | ||||
|       core.info(`✅ Godot saved to cache`) | ||||
|       core.endGroup() | ||||
|     } else { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user