-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
35 lines (33 loc) · 1.02 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: 'Swift Env'
description: 'A GitHub Action that sets up a Swift environment for cross-platform'
author: 'Koichi Yokota'
branding:
icon: 'package'
color: 'purple'
inputs:
swift-version:
description: 'Swift version to use'
required: true
default: '6.0.3'
winsdk-version:
description: 'WinSDK version to use on Windows'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Set up Swift ${{ inputs.swift-version }}
if: runner.os == 'macOS'
shell: bash
run: |
SWIFT_VERSION=${{ inputs.swift-version }} ./actions/gha-swift-macos.sh
- name: Set up Swift ${{ inputs.swift-version }}
if: runner.os == 'Linux'
shell: bash
run: |
SWIFT_VERSION=${{ inputs.swift-version }} ./actions/gha-swift-linux.sh
- name: Set up Swift ${{ inputs.swift-version }}
if: runner.os == 'Windows'
shell: pwsh
run: |
./actions/GHASwiftWindows.ps1 -SwiftVersion '${{ matrix.swift-version }}' -WinSDK '${{ inputs.winsdk-version }}'