Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Test setup-foreman action
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
os: ["ubuntu-22.04", "windows-latest", "macos-latest"]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -38,7 +38,7 @@ jobs:
name: Test setup-foreman action with working-directory
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
os: ["ubuntu-22.04", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -62,7 +62,7 @@ jobs:
name: Test allow-external-gitub-org false expect failure
strategy:
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
name: Test allow-external-gitub-org false expect success
strategy:
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-22.04"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion foreman.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is used as a way to make sure that setup-foreman is functioning.

[tools]
rojo = { source = "Roblox/rojo", version = "0.6.0-alpha.1" }
rojo = { source = "Roblox/rojo", version = "6.0.0" }
selene = { source = "Kampfkarren/selene", version = "0.15.0" }
12 changes: 10 additions & 2 deletions src/foreman.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ function chooseRelease(

function chooseAsset(release: GitHubRelease): GitHubAsset | null {
let platformMatcher: (name: string) => boolean;
const arch = os.arch();

if (process.platform === "win32") {
platformMatcher = name =>
name.includes("windows") ||
name.includes("win64") ||
name.includes("win32");
} else if (process.platform === "darwin") {
const arch = os.arch();
if (arch === "x64") {
if (release.tag_name >= "v1.0.5") {
platformMatcher = name => name.includes("macos-x86_64");
Expand All @@ -66,7 +66,15 @@ function chooseAsset(release: GitHubRelease): GitHubAsset | null {
platformMatcher = name => name.includes("macos-arm64");
}
} else if (process.platform === "linux") {
platformMatcher = name => name.includes("linux");
if (arch === "x64") {
if (release.tag_name >= "v1.6.4") {
platformMatcher = name => name.includes("linux-x86_64");
} else {
platformMatcher = name => name.includes("linux");
}
} else {
platformMatcher = name => name.includes("linux-arm64");
}
} else {
throw new Error(`Unsupported platform "${process.platform}"`);
}
Expand Down
Loading