mirror of
				https://github.com/actions/setup-go.git
				synced 2025-10-31 07:30:31 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | d0c5defdf3 | 
| @@ -19,6 +19,8 @@ The V2 offers: | |||||||
| - stable input  | - stable input  | ||||||
| - Bug Fixes (including issues around version matching and semver) | - Bug Fixes (including issues around version matching and semver) | ||||||
|  |  | ||||||
|  | It will first check the local cache for a version match. If version is not found locally, It will pull it from `main` branch of [go-versions](https://github.com/actions/go-versions/blob/main/versions-manifest.json) repository and on miss or failure, it will fall back to the previous behavior of download directly from [go dist](https://storage.googleapis.com/golang). | ||||||
|  |  | ||||||
| Matching by semver spec: | Matching by semver spec: | ||||||
| ```yaml | ```yaml | ||||||
| steps: | steps: | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -5034,7 +5034,7 @@ exports.extractGoArchive = extractGoArchive; | |||||||
| function getInfoFromManifest(versionSpec, stable, auth) { | function getInfoFromManifest(versionSpec, stable, auth) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         let info = null; |         let info = null; | ||||||
|         const releases = yield tc.getManifestFromRepo('actions', 'go-versions', auth); |         const releases = yield tc.getManifestFromRepo('actions', 'go-versions', auth, "main"); | ||||||
|         core.info(`matching ${versionSpec}...`); |         core.info(`matching ${versionSpec}...`); | ||||||
|         const rel = yield tc.findFromManifest(versionSpec, stable, releases); |         const rel = yield tc.findFromManifest(versionSpec, stable, releases); | ||||||
|         if (rel && rel.files.length > 0) { |         if (rel && rel.files.length > 0) { | ||||||
|   | |||||||
| @@ -140,7 +140,12 @@ export async function getInfoFromManifest( | |||||||
|   auth: string | undefined |   auth: string | undefined | ||||||
| ): Promise<IGoVersionInfo | null> { | ): Promise<IGoVersionInfo | null> { | ||||||
|   let info: IGoVersionInfo | null = null; |   let info: IGoVersionInfo | null = null; | ||||||
|   const releases = await tc.getManifestFromRepo('actions', 'go-versions', auth); |   const releases = await tc.getManifestFromRepo( | ||||||
|  |     'actions', | ||||||
|  |     'go-versions', | ||||||
|  |     auth, | ||||||
|  |     'main' | ||||||
|  |   ); | ||||||
|   core.info(`matching ${versionSpec}...`); |   core.info(`matching ${versionSpec}...`); | ||||||
|   const rel = await tc.findFromManifest(versionSpec, stable, releases); |   const rel = await tc.findFromManifest(versionSpec, stable, releases); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user