forked from mohamed-3amer/spm-create-xcframework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.js
32 lines (24 loc) · 819 Bytes
/
action.js
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
const core = require('@actions/core');
const exec = require('@actions/exec');
const path = require('path')
core.setCommandEcho(true)
async function run() {
try {
let target = core.getInput('target', { required: false })
let zipVersion = core.getInput('zip-version', { required: true })
let outputPath = core.getInput('output-path', { required: false })
// build options
var options = ['-target']
options.push(target)
options.push('-zip-version')
options.push(zipVersion)
if (!!outputPath) {
options.push('-output-path')
options.push(outputPath)
}
await exec.exec('sh',[ path.join(__dirname, "create_xcframework.sh"), ...options])
} catch (error) {
core.setFailed(error)
}
}
run()