Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/YOCKOW/Action-setup-swift

GitHub Action that sets up Swift.
https://github.com/YOCKOW/Action-setup-swift

setup-swift swift

Last synced: 3 months ago
JSON representation

GitHub Action that sets up Swift.

Awesome Lists containing this project

README

        

# Action: setup-swift

This action sets up a Swift environment using [swiftenv](https://github.com/kylef/swiftenv).

# Usage

See [action.yml](action.yml)

## Simple Workflow

```yaml
steps:
- uses: actions/checkout@v2
- uses: YOCKOW/Action-setup-swift@v1
with:
swift-version: '5.3' # This value is passed to swiftenv without modification.
- run: swift test
```

## Specify Swift Version with ".swift-version" file.

```yaml
steps:
- uses: actions/checkout@v2
- 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 test
```

## Others

You can see another slightly complex sample at [the author's gist](https://gist.github.com/YOCKOW/352b3594bfcb2c06d953647adaf65e78).

# License
MIT License.
See "LICENSE.txt" for more information.