Skip to content

Commit 7bd62c6

Browse files
committed
Update readme and meta
1 parent aed6897 commit 7bd62c6

File tree

3 files changed

+80
-3
lines changed

3 files changed

+80
-3
lines changed

.github/swift.svg

Lines changed: 22 additions & 0 deletions
Loading

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,54 @@
1-
# setup-swift
2-
GitHub Action to setup Swift
1+
# Setup Swift
2+
<img src=".github/swift.svg" height="20">
3+
<img src="https://img.shields.io/badge/macOS-grey">
4+
<img src="https://img.shields.io/badge/Ubuntu-grey">
5+
6+
GitHub Action to setup a Swift environment with a specific version. Works on both Ubuntu and macOS environments.
7+
8+
## Usage
9+
10+
To run the action with the latest swift version available, simply add the action as a step in your workflow:
11+
12+
```yaml
13+
- uses: fwal/setup-swift@master
14+
```
15+
16+
A version can be provided by setting the `swift-version` input:
17+
18+
```yaml
19+
- uses: fwal/setup-swift@master
20+
with:
21+
swift-version: "5.1.0"
22+
```
23+
24+
Works perfect together with matrixes:
25+
26+
```yaml
27+
name: Swift ${{ matrix.swift }} on ${{ matrix.os }}
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
matrix:
31+
os: [ubuntu-latest, macos-latest]
32+
swift: ["5.1.0", "4.2.4"]
33+
steps:
34+
- uses: fwal/setup-swift@master
35+
with:
36+
swift-version: ${{ matrix.swift }}
37+
```
38+
39+
## Note about versions
40+
41+
This project uses strict semantic versioning to determine what version of Swift to configure. This differs slightly from the official convention used by Swift.
42+
43+
For example, Swift is available as version `5.1` but this will be interpreted as a version _range_ of `5.1.X` where `X` is the latest patch version available for that major and minor version.
44+
45+
46+
In other words specifying...
47+
- `"5.1.0"` will resolve to version `5.1`
48+
- `"5.1"` will resolve to latest patch version (aka `5.1.1`)
49+
- `"5"` will resolve to latest minor and patch version (aka `5.1.1`)
50+
51+
52+
## Legal
53+
Uses MIT license.
54+
The Swift logo is a trademark of Apple Inc.

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Setup Swift environment
2-
description: Setup a Swift environment using swiftenv
2+
description: Setup a Swift environment on Ubuntu or macOS
33
author: Frederik Wallner
44
inputs:
55
swift-version:
@@ -9,3 +9,6 @@ inputs:
99
runs:
1010
using: node12
1111
main: lib/main.js
12+
branding:
13+
icon: 'command'
14+
color: 'orange'

0 commit comments

Comments
 (0)