Skip to content

Commit 7b71b0b

Browse files
committed
Update readme
1 parent 364295d commit 7b71b0b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,29 @@ To run the action with the latest swift version available, simply add the action
3131
After the environment is configured you can run swift commands using the standard [`run`](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsrun) step:
3232

3333
```yaml
34-
- uses: swift-actions/setup-swift@v2
34+
- uses: swift-actions/setup-swift@v3
3535
- name: Get swift version
3636
run: swift --version # Swift 6.2
3737
```
3838

3939
A specific Swift version can be set using the `swift-version` input:
4040

4141
```yaml
42-
- uses: swift-actions/setup-swift@v2
42+
- uses: swift-actions/setup-swift@v3
4343
with:
4444
swift-version: "5.1"
4545
- name: Get swift version
4646
run: swift --version # Swift 5.1.0
4747
```
4848

49+
Also works with snapshots:
50+
51+
```yaml
52+
- uses: swift-actions/setup-swift@v3
53+
with:
54+
swift-version: "main-snapshot"
55+
```
56+
4957
Works perfect together with matrixes:
5058

5159
```yaml
@@ -56,7 +64,7 @@ strategy:
5664
os: [ubuntu-latest, macos-latest]
5765
swift: ["5.4.3", "5.2.4"]
5866
steps:
59-
- uses: swift-actions/setup-swift@v2
67+
- uses: swift-actions/setup-swift@v3
6068
with:
6169
swift-version: ${{ matrix.swift }}
6270
- name: Get swift version
@@ -78,15 +86,15 @@ If you are running on a runner that is not able to verify the GPG signature of t
7886
YAML interprets eg. `5.0` as a float, this action will then interpret that as `5` which will result in eg. Swift 5.5 being resolved. Quote your inputs! Thus:
7987

8088
```
81-
- uses: swift-actions/setup-swift@v2
89+
- uses: swift-actions/setup-swift@v3
8290
with:
8391
swift-version: '5.0'
8492
```
8593

8694
Not:
8795

8896
```
89-
- uses: swift-actions/setup-swift@v2
97+
- uses: swift-actions/setup-swift@v3
9098
with:
9199
swift-version: 5.0
92100
```

0 commit comments

Comments
 (0)