You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,21 +31,29 @@ To run the action with the latest swift version available, simply add the action
31
31
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:
32
32
33
33
```yaml
34
-
- uses: swift-actions/setup-swift@v2
34
+
- uses: swift-actions/setup-swift@v3
35
35
- name: Get swift version
36
36
run: swift --version # Swift 6.2
37
37
```
38
38
39
39
A specific Swift version can be set using the `swift-version` input:
40
40
41
41
```yaml
42
-
- uses: swift-actions/setup-swift@v2
42
+
- uses: swift-actions/setup-swift@v3
43
43
with:
44
44
swift-version: "5.1"
45
45
- name: Get swift version
46
46
run: swift --version # Swift 5.1.0
47
47
```
48
48
49
+
Also works with snapshots:
50
+
51
+
```yaml
52
+
- uses: swift-actions/setup-swift@v3
53
+
with:
54
+
swift-version: "main-snapshot"
55
+
```
56
+
49
57
Works perfect together with matrixes:
50
58
51
59
```yaml
@@ -56,7 +64,7 @@ strategy:
56
64
os: [ubuntu-latest, macos-latest]
57
65
swift: ["5.4.3", "5.2.4"]
58
66
steps:
59
-
- uses: swift-actions/setup-swift@v2
67
+
- uses: swift-actions/setup-swift@v3
60
68
with:
61
69
swift-version: ${{ matrix.swift }}
62
70
- 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
78
86
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:
0 commit comments