Skip to content

Commit

Permalink
Bump docs to mention v2
Browse files Browse the repository at this point in the history
  • Loading branch information
fwal committed Mar 12, 2024
1 parent e2dda67 commit e1dca7c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
To run the action with the latest swift version available, simply add the action as a step in your workflow:

```yaml
- uses: swift-actions/setup-swift@v1
- uses: swift-actions/setup-swift@v2
```
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:
```yaml
- uses: swift-actions/setup-swift@v1
- uses: swift-actions/setup-swift@v2
- name: Get swift version
run: swift --version # Swift 5.10
```

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

```yaml
- uses: swift-actions/setup-swift@v1
- uses: swift-actions/setup-swift@v2
with:
swift-version: "5.1.0"
- name: Get swift version
Expand All @@ -51,7 +51,7 @@ strategy:
os: [ubuntu-latest, macos-latest]
swift: ["5.4.3", "5.2.4"]
steps:
- uses: swift-actions/setup-swift@v1
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- name: Get swift version
Expand All @@ -75,22 +75,22 @@ In other words specifying...
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:

```
- uses: swift-actions/setup-swift@v1
- uses: swift-actions/setup-swift@v2
with:
swift-version: '5.0'
```

Not:

```
- uses: swift-actions/setup-swift@v1
- uses: swift-actions/setup-swift@v2
with:
swift-version: 5.0
```

## Keeping the action up-to-date

You have two options for keeping this action up-to-date: either you define a specific version (like `v1.17.0`) or use the major version tag (like `v1`).
You have two options for keeping this action up-to-date: either you define a specific version (like `v2.0.1`) or use the major version tag (like `v2`).

### Specific version

Expand Down

0 comments on commit e1dca7c

Please sign in to comment.