Skip to content
info

GitHub Action

Swift version

v3.0.0 Latest version

Swift version

info

Swift version

Reads the current Swift version

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Swift version

uses: sersoft-gmbh/swift-version-action@v3.0.0

Learn more about this action in sersoft-gmbh/swift-version-action

Choose a version

Swift Version Action

Tests

This action reads the current Swift version.

Note: This action does not install or change the current Swift version. It just reads it. To change the Swift version on macOS, use xcode-select to select the corresponding Xcode version (or use an action like maxim-lobanov/setup-xcode). To install Swift on Linux, you can use our swifty-linux-action action.

Inputs

None

Outputs

version

The version of Swift that's currently active (e.g. 5.8.1).

Example Usage

Use the following snippet to read the current swift version:

uses: sersoft-gmbh/swift-version-action@v3