From cff22cb20e5615edbba2cb275f91b4723103baf8 Mon Sep 17 00:00:00 2001 From: marcprux Date: Wed, 6 Mar 2024 09:22:08 -0500 Subject: [PATCH] Support for Swift 5.10 --- .github/workflows/ci.yml | 6 +++--- .github/workflows/stability.yml | 4 ++-- .gitignore | 3 +++ README.md | 6 +++--- __tests__/swift-versions.test.ts | 2 +- action.yml | 2 +- src/swift-versions.ts | 1 + 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2469f59..2f3dd8f1 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.2"] + swift: ["5.10"] include: - os: macos-12 - swift: "5.9.2" + swift: "5.10" - os: ubuntu-22.04 - swift: "5.9.2" + swift: "5.10" - os: windows-latest swift: "5.6.3" steps: diff --git a/.github/workflows/stability.yml b/.github/workflows/stability.yml index e9093e53..c7a9c0a6 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.2"] + swift: ["5.10"] steps: - uses: swift-actions/setup-swift@v1 with: @@ -25,7 +25,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - swift: ["5.9.2"] + swift: ["5.10"] steps: - uses: swift-actions/setup-swift@main with: diff --git a/.gitignore b/.gitignore index a2a60825..4ad61b2f 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ lib/ # next.js build output .next + +# vi swap file +.*.swp diff --git a/README.md b/README.md index 0cfa41f1..f9f19444 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Supports macOS, Ubuntu & Windows - Swift 5.9.2 + Swift 5.10 Latest release @@ -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.2 + run: swift --version # Swift 5.10 ``` 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.2`) +- `"5"` will resolve to latest minor and patch version (aka `5.10`) ### Caveats diff --git a/__tests__/swift-versions.test.ts b/__tests__/swift-versions.test.ts index f9c2ffab..4a11bf81 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.2"); + expect(version).toBe("5.10"); }); it("identifies versions based on system", async () => { diff --git a/action.yml b/action.yml index 0dd7876c..5b694af3 100644 --- a/action.yml +++ b/action.yml @@ -5,7 +5,7 @@ inputs: swift-version: description: Swift version to configure required: true - default: '5.9.2' + default: '5.10' outputs: version: description: The full Swift version that was configured diff --git a/src/swift-versions.ts b/src/swift-versions.ts index 178406d0..47aa35bd 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[]][] = [ + ["5.10", [OS.MacOS, OS.Ubuntu]], ["5.9.2", [OS.MacOS, OS.Ubuntu]], ["5.9.1", [OS.MacOS, OS.Ubuntu]], ["5.9", [OS.MacOS, OS.Ubuntu]],