This action sets up a Swift environment using swiftenv(default) or swiftly.
- Ubuntu
- macOS
See action.yml
steps:
- uses: actions/checkout@v7
- uses: YOCKOW/Action-setup-swift@v1
with:
swift-version: '6.3.3' # This value is passed to swiftenv without modification.
- run: swift teststeps:
- uses: actions/checkout@v7
- uses: YOCKOW/Action-setup-swift@v1
with:
swift-package-directory: "./my-swift-package" # Default is "."
# The content of ".swift-version" will be used to specify the version
# when `swift-version` input is lacked.
# Error occurs if ".swift-version" file is not found.
- run: swift testYou can use swiftly to install Swift passing 'swiftly' to swift-installer input.
steps:
- uses: actions/checkout@v7
- uses: YOCKOW/Action-setup-swift@v1.2
with:
swift-installer: swiftly
swift-version: "DEVELOPMENT-SNAPSHOT-2026-08-21-a" # This value is passed to swiftly without modification.
# Other values are also available such as:
# "latest"
# "main-snapshot"
# "6.4.x-snapshot"
- run: swift testYou can see another slightly complex sample at the author's gist.
MIT License.
See "LICENSE.txt" for more information.