Skip to content

Commit

Permalink
Merge branch 'release/2.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
sinoru committed Aug 3, 2021
2 parents 8f5efaa + 68f3a54 commit 4c0efd7
Show file tree
Hide file tree
Showing 7 changed files with 8,177 additions and 1,563 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ["ubuntu-16.04", "ubuntu-18.04", "ubuntu-20.04", "macos-10.15"]
swift-version: ["5.0.3", "5.1.5", "5.2.5", "5.3.3"]
operating-system: ["ubuntu-18.04", "ubuntu-20.04", "macos-10.15"]
swift-version: ["5.0.3", "5.1.5", "5.2.5", "5.3.3", "5.4.2"]
exclude:
- operating-system: "ubuntu-20.04"
swift-version: "5.0.3"
Expand All @@ -29,4 +29,7 @@ jobs:
- uses: ./
with:
swift-version: ${{ matrix.swift-version }}
- run: echo $PATH
- run: which swift
- run: swiftenv which swift
- run: swift -version
485 changes: 349 additions & 136 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions dist/licenses.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ async function installEssentials() {
async function installSwiftenv() {
core.startGroup('Install swiftlint');

await exec.exec('git clone --depth 1 https://github.com/kylef/swiftenv.git ~/.swiftenv');
const swiftenvRoot = process.env.HOME + '/.swiftenv'

core.exportVariable('SWIFTENV_ROOT', '~/.swiftenv');
core.addPath('~/.swiftenv/bin');
core.addPath('~/.swiftenv/shims');
await exec.exec('git clone --depth 1 https://github.com/kylef/swiftenv.git ' + swiftenvRoot);

core.exportVariable('SWIFTENV_ROOT', process.env.HOME + '/.swiftenv');
core.addPath(swiftenvRoot + '/bin');
core.addPath(swiftenvRoot + '/shims');

core.endGroup();
}
Expand All @@ -38,6 +40,10 @@ async function installSwift(options = {}) {
async function setupSwift() {
const swiftVersion = core.getInput('swift-version', { required: false });

if (swiftVersion) {
core.exportVariable('SWIFT_VERSION', swiftVersion)
}

await installEssentials();
await installSwiftenv();
await installSwift({'swiftVersion': swiftVersion, 'debug': core.isDebug()});
Expand Down
Loading

0 comments on commit 4c0efd7

Please sign in to comment.