WARNING: this action is deprecated, please use gha-setup-swift instead.
GitHub Action for building your code with Swift on Windows
Optional The shell command to run on your project. Default is swift test
.
Optional The version of Swift to install. Default is "5.4.2"
.
Warning You should always quote this argument, since YAML is not type-safe. This argument expects a string, and a simple 5.4
without double or single quotes around the value will be interpreted as a floating point value, which may lead to unexpected results and bugs.
name: Build and test with Swift on Windows
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
swift_for_windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: MaxDesiatov/swift-windows-action@v1
To build your project without testing, pass an explicit shell-action
input with value swift build
:
jobs:
swift_for_windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: MaxDesiatov/swift-windows-action@v1
with:
shell-action: swift build