Skip to content

Commit ce50841

Browse files
committed
Merge branch 'release/2.0.2' into main
2 parents e798f76 + 59e9450 commit ce50841

File tree

7 files changed

+26
-11
lines changed

7 files changed

+26
-11
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
[![Unit Tests](https://github.com/sinoru/actions-setup-swift/actions/workflows/units.yml/badge.svg)](https://github.com/sinoru/actions-setup-swift/actions/workflows/test.yml)
44
[![Tests](https://github.com/sinoru/actions-setup-swift/actions/workflows/tests.yml/badge.svg)](https://github.com/sinoru/actions-setup-swift/actions/workflows/test.yml)
55

6-
This action sets up a swift environment using [swiftenv](https://github.com/kylef/swiftenv) for use in actions by:
6+
This action sets up a swift environment for use in actions by:
77

8-
- optionally downloading a version of swift from swift.org.
9-
- supports macOS, Linux runner.
8+
- optionally downloading a version of swift from swift.org using [swiftenv](https://github.com/kylef/swiftenv).
109

1110
# Usage
1211

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Setup Swift (swiftenv)'
2-
description: 'Set up a specific version of swift using swiftenv'
1+
name: 'Setup Swift environment'
2+
description: 'Setup a Swift environment and optionally downloading and adding it to the PATH'
33
branding:
44
icon: 'feather'
55
color: 'orange'

dist/index.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,20 @@ async function installSwiftenv() {
2727
core.endGroup();
2828
}
2929

30+
async function installSwift(options = {}) {
31+
core.startGroup('Install swift');
32+
33+
await swiftenv.install(options);
34+
35+
core.endGroup();
36+
}
37+
3038
async function setupSwift() {
3139
const swiftVersion = core.getInput('swift-version', { required: false });
3240

3341
await installEssentials();
3442
await installSwiftenv();
35-
await swiftenv.install({'swiftVersion': swiftVersion, 'debug': core.isDebug()});
43+
await installSwift({'swiftVersion': swiftVersion, 'debug': core.isDebug()});
3644
}
3745

3846
// most @actions toolkit packages have async methods

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "actions-setup-swift",
3-
"version": "2.0.1",
4-
"description": "Set up a specific version of swift using swiftenv",
3+
"version": "2.0.2",
4+
"description": "Setup a Swift environment and optionally downloading and adding it to the PATH",
55
"main": "index.mjs",
66
"scripts": {
77
"lint": "eslint .",

0 commit comments

Comments
 (0)