Skip to content

Swift

How json2vars-setter handles Swift, and how the example workflow provisions it.

json2vars-setter integration

Item Value
Matrix JSON key versions.swift
Action output versions_swift
Dynamic-update strategy input swift-strategy (stable / latest / both)
Version source see Version Sources

Supported runners

The example matrix runs on Ubuntu / macOS:

ubuntu-latest, macos-latest

Any GitHub-hosted runner the setup action supports also works - the OS list is just the os array in your matrix JSON.

Supported versions

Example matrix (what the example workflow runs):

1
2
3
4
5
6
7
8
{
  "versions": {
    "swift": [
      "6.2",
      "6.2.1"
    ]
  }
}

Latest values tracked by the dynamic-update tooling (auto-refreshed from the release APIs into the version cache):

Field Version
stable 6.2.4
latest 6.3.2

Cache last updated: 2026-06-24T12:28:42.733299.

Setup action (example workflow)

swift_test.yml provisions Swift with the matrix value json2vars-setter produced:

1
2
3
4
- name: Set up Swift
  uses: swift-actions/setup-swift@v2.4.0
  with:
    swift-version: ${{ matrix.swift-version }}

Note: swift-actions/setup-swift installs from its own bundled list of known Swift versions, which can lag the newest swift.org release - pin to a version the action supports if the very latest is not yet available.

References