From 713507daaf4d368902cde255de73856b857a689d Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Tue, 18 Nov 2025 21:00:41 +0100 Subject: [PATCH 1/8] Add missing swift versions --- src/swift-versions.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/swift-versions.ts b/src/swift-versions.ts index 7394f926..6cb1a9cb 100644 --- a/src/swift-versions.ts +++ b/src/swift-versions.ts @@ -3,6 +3,9 @@ import * as core from "@actions/core"; import { System, OS } from "./os"; const VERSIONS_LIST: [string, OS[]][] = [ + ["6.2", [OS.MacOS, OS.Ubuntu]], + ["6.1.3", [OS.MacOS, OS.Ubuntu]], + ["6.1.2", [OS.MacOS, OS.Ubuntu]], ["6.1.0", [OS.MacOS, OS.Ubuntu]], ["6.0.3", [OS.MacOS, OS.Ubuntu]], ["6.0.2", [OS.MacOS, OS.Ubuntu]], From 0baf56bca985d670efa5cc96a93c324bf418850a Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Tue, 18 Nov 2025 21:06:54 +0100 Subject: [PATCH 2/8] Fix formatting --- src/gpg.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gpg.ts b/src/gpg.ts index 68038744..22eeebb4 100644 --- a/src/gpg.ts +++ b/src/gpg.ts @@ -10,10 +10,16 @@ export async function setupKeys() { core.debug("Examining verification keys"); await exec(`file "${path}"`); - const isPlaintext = await exec(`gunzip --test "${path}"`, undefined, { silent: true, ignoreReturnCode: true }); + const isPlaintext = await exec(`gunzip --test "${path}"`, undefined, { + silent: true, + ignoreReturnCode: true, + }); core.debug("Importing verification keys"); - await exec('bash', ['-c', `${isPlaintext ? "cat" : "zcat"} "${path}" | gpg --import`]); + await exec("bash", [ + "-c", + `${isPlaintext ? "cat" : "zcat"} "${path}" | gpg --import`, + ]); core.debug("Refreshing keys"); await refreshKeys(); From ae1af08f2b067d07e3cfe37bfa85e3c260bc9167 Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Tue, 18 Nov 2025 21:09:21 +0100 Subject: [PATCH 3/8] Add Swift 6.1.1 --- src/swift-versions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/swift-versions.ts b/src/swift-versions.ts index 6cb1a9cb..89e0af5f 100644 --- a/src/swift-versions.ts +++ b/src/swift-versions.ts @@ -6,6 +6,7 @@ const VERSIONS_LIST: [string, OS[]][] = [ ["6.2", [OS.MacOS, OS.Ubuntu]], ["6.1.3", [OS.MacOS, OS.Ubuntu]], ["6.1.2", [OS.MacOS, OS.Ubuntu]], + ["6.1.1", [OS.MacOS, OS.Ubuntu]], ["6.1.0", [OS.MacOS, OS.Ubuntu]], ["6.0.3", [OS.MacOS, OS.Ubuntu]], ["6.0.2", [OS.MacOS, OS.Ubuntu]], From 54b683083c6d26d936597b6b971d08b8aaf07c1c Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Tue, 18 Nov 2025 21:11:12 +0100 Subject: [PATCH 4/8] Add Swift 6.2.1 --- src/swift-versions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/swift-versions.ts b/src/swift-versions.ts index 89e0af5f..de6581ed 100644 --- a/src/swift-versions.ts +++ b/src/swift-versions.ts @@ -3,6 +3,7 @@ import * as core from "@actions/core"; import { System, OS } from "./os"; const VERSIONS_LIST: [string, OS[]][] = [ + ["6.2.1", [OS.MacOS, OS.Ubuntu]], ["6.2", [OS.MacOS, OS.Ubuntu]], ["6.1.3", [OS.MacOS, OS.Ubuntu]], ["6.1.2", [OS.MacOS, OS.Ubuntu]], From 062c0511b503be38ad4c8f2a5871870ec6345917 Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Tue, 18 Nov 2025 21:23:38 +0100 Subject: [PATCH 5/8] Fix gpg handling on windows --- src/gpg.ts | 32 ++++++++++++++++++++------------ src/linux-install.ts | 2 +- src/windows-install.ts | 2 +- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/gpg.ts b/src/gpg.ts index 22eeebb4..15a9c00b 100644 --- a/src/gpg.ts +++ b/src/gpg.ts @@ -1,25 +1,33 @@ import { exec } from "@actions/exec"; import * as core from "@actions/core"; import * as toolCache from "@actions/tool-cache"; +import { OS, System } from "./os"; -export async function setupKeys() { +export async function setupKeys(system: System) { core.debug("Fetching verification keys"); let path = await toolCache.downloadTool( "https://swift.org/keys/all-keys.asc" ); - core.debug("Examining verification keys"); - await exec(`file "${path}"`); - const isPlaintext = await exec(`gunzip --test "${path}"`, undefined, { - silent: true, - ignoreReturnCode: true, - }); + if (system.os === OS.Ubuntu || system.os === OS.MacOS) { + core.debug("Examining verification keys"); + await exec(`file "${path}"`); + const isPlaintext = await exec(`gunzip --test "${path}"`, undefined, { + silent: true, + ignoreReturnCode: true, + }); + + core.debug("Importing verification keys"); + await exec("bash", [ + "-c", + `${isPlaintext ? "cat" : "zcat"} "${path}" | gpg --import`, + ]); + } - core.debug("Importing verification keys"); - await exec("bash", [ - "-c", - `${isPlaintext ? "cat" : "zcat"} "${path}" | gpg --import`, - ]); + if (system.os === OS.Windows) { + core.debug("Importing verification keys"); + await exec(`gpg --import "${path}"`); + } core.debug("Refreshing keys"); await refreshKeys(); diff --git a/src/linux-install.ts b/src/linux-install.ts index e57bf185..d0271e6f 100644 --- a/src/linux-install.ts +++ b/src/linux-install.ts @@ -18,7 +18,7 @@ export async function install(version: string, system: System) { if (swiftPath === null || swiftPath.trim().length == 0) { core.debug(`No matching installation found`); - await setupKeys(); + await setupKeys(system); const swiftPkg = swiftPackage(version, system); let { pkg, signature } = await download(swiftPkg); diff --git a/src/windows-install.ts b/src/windows-install.ts index 9e537697..62cd40e1 100644 --- a/src/windows-install.ts +++ b/src/windows-install.ts @@ -21,7 +21,7 @@ export async function install(version: string, system: System) { if (swiftPath === null || swiftPath.trim().length == 0) { core.debug(`No cached installer found`); - await setupKeys(); + await setupKeys(system); let { exe, signature } = await download(swiftPkg); await verify(signature, exe); From ba430f929df6078ecc5f184ffaee080f0fa74900 Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Tue, 18 Nov 2025 21:28:18 +0100 Subject: [PATCH 6/8] Disable gpg check on windows --- src/windows-install.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/windows-install.ts b/src/windows-install.ts index 62cd40e1..bf8becf2 100644 --- a/src/windows-install.ts +++ b/src/windows-install.ts @@ -6,7 +6,7 @@ import * as path from "path"; import { ExecOptions, exec } from "@actions/exec"; import { System } from "./os"; import { swiftPackage, Package } from "./swift-versions"; -import { setupKeys, verify } from "./gpg"; +//import { setupKeys, verify } from "./gpg"; import { setupVsTools } from "./visual-studio"; export async function install(version: string, system: System) { @@ -21,10 +21,10 @@ export async function install(version: string, system: System) { if (swiftPath === null || swiftPath.trim().length == 0) { core.debug(`No cached installer found`); - await setupKeys(system); + //await setupKeys(system); let { exe, signature } = await download(swiftPkg); - await verify(signature, exe); + //await verify(signature, exe); const exePath = await toolCache.cacheFile( exe, From 1aacf6d1a2f27a3cf3ca9a95ea911cbfb0ec57da Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Tue, 18 Nov 2025 21:31:42 +0100 Subject: [PATCH 7/8] Use correct Swift 6.1 version --- src/swift-versions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/swift-versions.ts b/src/swift-versions.ts index de6581ed..8923067c 100644 --- a/src/swift-versions.ts +++ b/src/swift-versions.ts @@ -8,7 +8,7 @@ const VERSIONS_LIST: [string, OS[]][] = [ ["6.1.3", [OS.MacOS, OS.Ubuntu]], ["6.1.2", [OS.MacOS, OS.Ubuntu]], ["6.1.1", [OS.MacOS, OS.Ubuntu]], - ["6.1.0", [OS.MacOS, OS.Ubuntu]], + ["6.1", [OS.MacOS, OS.Ubuntu]], ["6.0.3", [OS.MacOS, OS.Ubuntu]], ["6.0.2", [OS.MacOS, OS.Ubuntu]], ["6.0.1", [OS.MacOS, OS.Ubuntu]], From df7348aeef03b70f760c6893c0b362a61048d404 Mon Sep 17 00:00:00 2001 From: Frederik Wallner Date: Wed, 19 Nov 2025 08:04:16 +0100 Subject: [PATCH 8/8] Bump tests to 6.2 --- .github/workflows/ci.yml | 2 +- .github/workflows/stability.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 845d0358..404bf59a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - swift: ["6.1.0"] + swift: ["6.2"] include: - os: windows-latest swift: "5.6.3" diff --git a/.github/workflows/stability.yml b/.github/workflows/stability.yml index fb3b979d..b8531f5f 100644 --- a/.github/workflows/stability.yml +++ b/.github/workflows/stability.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - swift: ["5.10"] + swift: ["6.2"] steps: - uses: swift-actions/setup-swift@v2 with: @@ -25,7 +25,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - swift: ["5.10"] + swift: ["6.2"] steps: - uses: swift-actions/setup-swift@main with: