This commit is contained in:
Opportunity
2019-09-30 18:16:56 +08:00
Unverified
parent 7c2a9b6f1c
commit 74d9ac9b05
3 changed files with 17 additions and 9 deletions
+6 -1
View File
@@ -1,11 +1,16 @@
const core = require('@actions/core')
const { exec, execSync } = require('child_process')
const fetch = require('node-fetch')
const fs = require('fs')
async function run() {
try {
const version = core.getInput('xmake-version')
execSync("bash <(curl -fsSL https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh)")
const data = fetch('https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh')
await fs.promises.mkdir('/tmp/xmake')
await fs.promises.writeFile(`/tmp/xmake/get.sh`, await (await data).buffer())
execSync(`bash /tmp/xmake/get.sh`)
core.addPath("/home/runner/.local/bin")
} catch (error) {