From d2cd27ea185b13bb8ee9b85e76ec1748fbfbe869 Mon Sep 17 00:00:00 2001
From: treastrain / Tanaka Ryoga
Date: Tue, 19 Dec 2023 16:09:11 +0900
Subject: [PATCH] Add support Swift 5.9.1 & 5.9.2
---
.github/workflows/ci.yml | 6 +++---
.github/workflows/stability.yml | 4 ++--
README.md | 6 +++---
__tests__/swift-versions.test.ts | 2 +-
action.yml | 2 +-
src/swift-versions.ts | 2 ++
6 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index eecebb33..e2469f59 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,12 +23,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
- swift: ["5.9"]
+ swift: ["5.9.2"]
include:
- os: macos-12
- swift: "5.9"
+ swift: "5.9.2"
- os: ubuntu-22.04
- swift: "5.9"
+ swift: "5.9.2"
- os: windows-latest
swift: "5.6.3"
steps:
diff --git a/.github/workflows/stability.yml b/.github/workflows/stability.yml
index 34dd3b89..e9093e53 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.9"]
+ swift: ["5.9.2"]
steps:
- uses: swift-actions/setup-swift@v1
with:
@@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
- swift: ["5.9"]
+ swift: ["5.9.2"]
steps:
- uses: swift-actions/setup-swift@main
with:
diff --git a/README.md b/README.md
index 544fb311..0cfa41f1 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
-
+
@@ -28,7 +28,7 @@ After the environment is configured you can run swift commands using the standar
```yaml
- uses: swift-actions/setup-swift@v1
- name: Get swift version
- run: swift --version # Swift 5.9
+ run: swift --version # Swift 5.9.2
```
A specific Swift version can be set using the `swift-version` input:
@@ -68,7 +68,7 @@ For example, Swift is available as version `5.1` but using this as value for `sw
In other words specifying...
- `"5.1.0"` will resolve to version `5.1`
- `"5.1"` will resolve to latest patch version (aka `5.1.1`)
-- `"5"` will resolve to latest minor and patch version (aka `5.9`)
+- `"5"` will resolve to latest minor and patch version (aka `5.9.2`)
### Caveats
diff --git a/__tests__/swift-versions.test.ts b/__tests__/swift-versions.test.ts
index 3d7bfd76..f9c2ffab 100644
--- a/__tests__/swift-versions.test.ts
+++ b/__tests__/swift-versions.test.ts
@@ -28,7 +28,7 @@ describe("swift version resolver", () => {
it("identifies X versions", async () => {
const version = await versions.verify("5", macOS);
- expect(version).toBe("5.9");
+ expect(version).toBe("5.9.2");
});
it("identifies versions based on system", async () => {
diff --git a/action.yml b/action.yml
index 36b672c4..0dd7876c 100644
--- a/action.yml
+++ b/action.yml
@@ -5,7 +5,7 @@ inputs:
swift-version:
description: Swift version to configure
required: true
- default: '5.9'
+ default: '5.9.2'
outputs:
version:
description: The full Swift version that was configured
diff --git a/src/swift-versions.ts b/src/swift-versions.ts
index 5e85914c..178406d0 100644
--- a/src/swift-versions.ts
+++ b/src/swift-versions.ts
@@ -3,6 +3,8 @@ import * as core from "@actions/core";
import { System, OS } from "./os";
const VERSIONS_LIST: [string, OS[]][] = [
+ ["5.9.2", [OS.MacOS, OS.Ubuntu]],
+ ["5.9.1", [OS.MacOS, OS.Ubuntu]],
["5.9", [OS.MacOS, OS.Ubuntu]],
["5.8.1", [OS.MacOS, OS.Ubuntu]],
["5.8", [OS.MacOS, OS.Ubuntu]],