Skip to content

Commit d53ab4f

Browse files
- fix version matching to only match against release versions only, not alpha/beta channels unless specifically requested
1 parent 17a940f commit d53ab4f

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

dist/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34834,7 +34834,12 @@ async function getLatestRelease(version, isSilicon) {
3483434834
for (const release of validReleases) {
3483534835
const originalRelease = releases.find(r => r.includes(release.version));
3483634836
const match = originalRelease.match(/(?<version>\d+\.\d+\.\d+[fab]?\d*)\s*(?:\((?<arch>Apple silicon|Intel)\))?/);
34837-
if (match && match.groups && match.groups.version) {
34837+
if (!(match && match.groups && match.groups.version)) {
34838+
continue;
34839+
}
34840+
if ((version.includes('a') && match.groups.version.includes('a')) ||
34841+
(version.includes('b') && match.groups.version.includes('b')) ||
34842+
match.groups.version.includes('f')) {
3483834843
core.info(`Found Unity ${match.groups.version}`);
3483934844
return [match.groups.version, undefined];
3484034845
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unity-setup",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "A GitHub action for setting up the Unity Game Engine for CI/CD workflows.",
55
"author": "RageAgainstThePixel",
66
"license": "MIT",

src/unity-hub.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,10 @@ async function getLatestRelease(version: string, isSilicon: boolean): Promise<[s
271271
for (const release of validReleases) {
272272
const originalRelease = releases.find(r => r.includes(release.version));
273273
const match = originalRelease.match(/(?<version>\d+\.\d+\.\d+[fab]?\d*)\s*(?:\((?<arch>Apple silicon|Intel)\))?/);
274-
if (match && match.groups && match.groups.version) {
274+
if (!(match && match.groups && match.groups.version)) { continue; }
275+
if ((version.includes('a') && match.groups.version.includes('a')) ||
276+
(version.includes('b') && match.groups.version.includes('b')) ||
277+
match.groups.version.includes('f')) {
275278
core.info(`Found Unity ${match.groups.version}`);
276279
return [match.groups.version, undefined];
277280
}

0 commit comments

Comments
 (0)