mirror of
				https://github.com/chickensoft-games/setup-godot.git
				synced 2025-10-31 15:33:55 +00:00 
			
		
		
		
	fix: generate correct download on stable releases (#19)
This commit is contained in:
		
							parent
							
								
									0f0c9d412c
								
							
						
					
					
						commit
						7841bee43b
					
				
							
								
								
									
										2
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @ -37,7 +37,7 @@ jobs: | |||||||
|         with: |         with: | ||||||
|           # Version must include major, minor, and patch, and be >= 4.0.0 |           # Version must include major, minor, and patch, and be >= 4.0.0 | ||||||
|           # Pre-release label is optional. |           # Pre-release label is optional. | ||||||
|           version: 4.0.0-beta16 |           version: 4.0.0 | ||||||
| 
 | 
 | ||||||
|       - name: 🔬 Verify Setup |       - name: 🔬 Verify Setup | ||||||
|         run: | |         run: | | ||||||
|  | |||||||
							
								
								
									
										27
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								README.md
									
									
									
									
									
								
							| @ -1,12 +1,17 @@ | |||||||
| # Setup Godot | # Setup Godot | ||||||
| 
 | 
 | ||||||
| Setup Godot for headless use with macOS, Windows, and Linux CI/CD runners. | [![Chickensoft Badge][chickensoft-badge]][chickensoft-website] [![Discord][discord-badge]][discord] | ||||||
| 
 | 
 | ||||||
| - ✅ Godot 4 Only. | Setup Godot for use with .NET on macOS, Windows, and Linux CI/CD runners. | ||||||
| - ✅ Setup and run Godot on the OS you are developing for. | 
 | ||||||
| - ✅ Caches Godot 4 installation for speedier workflows. | - ✅ Godot 4.x | ||||||
|  | - ✅ C# supported using .NET version of Godot. | ||||||
|  | - ✅ Installs Godot directly on the CI/CD runner. | ||||||
|  | - ✅ Caches Godot installation for speedier workflows. | ||||||
| - ✅ Adds environment variables (`GODOT4`, `GODOT`) to the system path. | - ✅ Adds environment variables (`GODOT4`, `GODOT`) to the system path. | ||||||
| - ✅ Installs Godot on the runner — do whatever you want with it afterwards! | - ✅ Runs on macOS Github Actions runner. | ||||||
|  | - ✅ Runs on Windows Github Actions runner. | ||||||
|  | - ✅ Runs on Ubuntu Github Actions runner. | ||||||
| 
 | 
 | ||||||
| > **Godot 3.x and below are not supported.** | > **Godot 3.x and below are not supported.** | ||||||
| 
 | 
 | ||||||
| @ -48,12 +53,12 @@ jobs: | |||||||
|       - name: 📦 Restore Dependencies |       - name: 📦 Restore Dependencies | ||||||
|         run: dotnet restore |         run: dotnet restore | ||||||
| 
 | 
 | ||||||
|       - uses: chickensoft-games/setup-godot |       - uses: chickensoft-games/setup-godot@v1 | ||||||
|         name: 🤖 Setup Godot |         name: 🤖 Setup Godot | ||||||
|         with: |         with: | ||||||
|           # Version must include major, minor, and patch, and be >= 4.0.0 |           # Version must include major, minor, and patch, and be >= 4.0.0 | ||||||
|           # Pre-release label is optional. |           # Pre-release label is optional. | ||||||
|           version: 4.0.0-beta16 |           version: 4.0.0-beta16 # also valid: 4.0.0.rc1 or 4.0.0, etc | ||||||
| 
 | 
 | ||||||
|       - name: 🔬 Verify Setup |       - name: 🔬 Verify Setup | ||||||
|         run: | |         run: | | ||||||
| @ -68,3 +73,11 @@ jobs: | |||||||
| 
 | 
 | ||||||
|       # Do whatever you want! |       # Do whatever you want! | ||||||
| ``` | ``` | ||||||
|  | 
 | ||||||
|  | <!-- Links --> | ||||||
|  | 
 | ||||||
|  | <!-- Header --> | ||||||
|  | [chickensoft-badge]: https://chickensoft.games/images/chickensoft/chickensoft_badge.svg | ||||||
|  | [chickensoft-website]: https://chickensoft.games | ||||||
|  | [discord]: https://discord.gg/gSjaPgMmYW | ||||||
|  | [discord-badge]: https://img.shields.io/badge/Chickensoft%20Discord-%237289DA.svg?style=flat&logo=discord&logoColor=white | ||||||
|  | |||||||
| @ -63,13 +63,13 @@ describe('getGodotUrl', () => { | |||||||
|   }) |   }) | ||||||
|   test('4.0.0', () => { |   test('4.0.0', () => { | ||||||
|     expect(getGodotUrl('4.0.0', getPlatform('linux'))).toEqual( |     expect(getGodotUrl('4.0.0', getPlatform('linux'))).toEqual( | ||||||
|       'https://downloads.tuxfamily.org/godotengine/4.0/mono/Godot_v4.0_mono_linux_x86_64.zip' |       'https://downloads.tuxfamily.org/godotengine/4.0/mono/Godot_v4.0-stable_mono_linux_x86_64.zip' | ||||||
|     ) |     ) | ||||||
|     expect(getGodotUrl('4.0.0', getPlatform('win32'))).toEqual( |     expect(getGodotUrl('4.0.0', getPlatform('win32'))).toEqual( | ||||||
|       'https://downloads.tuxfamily.org/godotengine/4.0/mono/Godot_v4.0_mono_win64.zip' |       'https://downloads.tuxfamily.org/godotengine/4.0/mono/Godot_v4.0-stable_mono_win64.zip' | ||||||
|     ) |     ) | ||||||
|     expect(getGodotUrl('4.0.0', getPlatform('darwin'))).toEqual( |     expect(getGodotUrl('4.0.0', getPlatform('darwin'))).toEqual( | ||||||
|       'https://downloads.tuxfamily.org/godotengine/4.0/mono/Godot_v4.0_mono_macos.universal.zip' |       'https://downloads.tuxfamily.org/godotengine/4.0/mono/Godot_v4.0-stable_mono_macos.universal.zip' | ||||||
|     ) |     ) | ||||||
|   }) |   }) | ||||||
| }) | }) | ||||||
|  | |||||||
							
								
								
									
										3
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -329,6 +329,9 @@ function getGodotFilename(version, platform) { | |||||||
|     if (label !== '') { |     if (label !== '') { | ||||||
|         filename += `-${label}`; |         filename += `-${label}`; | ||||||
|     } |     } | ||||||
|  |     else { | ||||||
|  |         filename += '-stable'; | ||||||
|  |     } | ||||||
|     return filename + platform.godotFilenameSuffix; |     return filename + platform.godotFilenameSuffix; | ||||||
| } | } | ||||||
| exports.getGodotFilename = getGodotFilename; | exports.getGodotFilename = getGodotFilename; | ||||||
|  | |||||||
							
								
								
									
										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
											
										
									
								
							
							
								
								
									
										23959
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										23959
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										14
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								package.json
									
									
									
									
									
								
							| @ -1,8 +1,8 @@ | |||||||
| { | { | ||||||
|   "name": "setup-godot", |   "name": "setup-godot", | ||||||
|   "version": "0.0.0", |   "version": "1.0.0", | ||||||
|   "private": true, |   "private": true, | ||||||
|   "description": "Setup Godot for headless use with macOS, Windows, and Linux runners.", |   "description": "Setup Godot for use with .NET on macOS, Windows, and Linux CI/CD runners.", | ||||||
|   "main": "lib/main.js", |   "main": "lib/main.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "build": "tsc", |     "build": "tsc", | ||||||
| @ -32,15 +32,15 @@ | |||||||
|     "@actions/tool-cache": "^2.0.1" |     "@actions/tool-cache": "^2.0.1" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@types/node": "^18.11.18", |     "@types/node": "^18.14.2", | ||||||
|     "@typescript-eslint/parser": "^5.50.0", |     "@typescript-eslint/parser": "^5.54.0", | ||||||
|     "@vercel/ncc": "^0.36.1", |     "@vercel/ncc": "^0.36.1", | ||||||
|     "eslint": "^8.33.0", |     "eslint": "^8.33.0", | ||||||
|     "eslint-plugin-github": "^4.6.0", |     "eslint-plugin-github": "^4.6.1", | ||||||
|     "eslint-plugin-jest": "^27.2.1", |     "eslint-plugin-jest": "^27.2.1", | ||||||
|     "jest": "^29.4.1", |     "jest": "^29.4.3", | ||||||
|     "js-yaml": "^4.1.0", |     "js-yaml": "^4.1.0", | ||||||
|     "prettier": "^2.8.3", |     "prettier": "^2.8.4", | ||||||
|     "ts-jest": "^29.0.5", |     "ts-jest": "^29.0.5", | ||||||
|     "typescript": "^4.9.5" |     "typescript": "^4.9.5" | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -133,6 +133,8 @@ export function getGodotFilename( | |||||||
|   } |   } | ||||||
|   if (label !== '') { |   if (label !== '') { | ||||||
|     filename += `-${label}` |     filename += `-${label}` | ||||||
|  |   } else { | ||||||
|  |     filename += '-stable' | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return filename + platform.godotFilenameSuffix |   return filename + platform.godotFilenameSuffix | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user