Compare commits
30 Commits
1.0.0
...
a06df1ffd4
Author | SHA1 | Date | |
---|---|---|---|
a06df1ffd4 | |||
4d8fd40b35 | |||
b175fc8e0c | |||
68846af98a | |||
![]() |
5d98ddc5d0 | ||
![]() |
9b2f64c24d | ||
b14409b769 | |||
![]() |
15f09b0635 | ||
242cc4be49 | |||
c150e9efbd | |||
e077375d7c | |||
3d169cd233 | |||
![]() |
e8d4cb33d9 | ||
![]() |
7d605870c0 | ||
![]() |
a457e38700 | ||
![]() |
17a898d02a | ||
![]() |
1c5d29e942 | ||
![]() |
94538aa220 | ||
![]() |
19335a5c7b | ||
![]() |
e4d34f52ab | ||
![]() |
8b61f6099e | ||
![]() |
4769ee6330 | ||
![]() |
cd6fb576a0 | ||
![]() |
5bb376cc11 | ||
![]() |
d0e1ddd718 | ||
![]() |
b3735d0768 | ||
![]() |
638ddf0f30 | ||
![]() |
3b57845c71 | ||
![]() |
18272e7393 | ||
![]() |
5b9d8a6eb7 |
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@@ -1,19 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
- run: echo $PATH
|
||||
- run: yarn global bin
|
||||
- run: ls -lah $(yarn global bin)
|
||||
- run: lix
|
22
.github/workflows/ci.yml.bak
vendored
Normal file
22
.github/workflows/ci.yml.bak
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
- run: lix
|
||||
- run: lix install haxe stable
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1 @@
|
||||
node_modules
|
||||
build/haxe-output.js
|
||||
node_modules
|
@@ -3,7 +3,7 @@
|
||||
### Usage:
|
||||
|
||||
```yaml
|
||||
- uses: lix-pm/setup-lix@master
|
||||
- uses: lix-pm/setup-lix@1.0.1
|
||||
with:
|
||||
lix-version: 15.5.4 # optional
|
||||
```
|
||||
lix-version: 15.12.0 # optional
|
||||
```
|
||||
|
18
action.yml
18
action.yml
@@ -1,13 +1,11 @@
|
||||
name: 'Setup Lix'
|
||||
description: 'Setup Lix (a package manager for Haxe)'
|
||||
name: "Setup Lix"
|
||||
description: "Setup Lix (a package manager for Haxe)"
|
||||
branding:
|
||||
icon: 'package'
|
||||
color: 'blue'
|
||||
icon: "package"
|
||||
color: "blue"
|
||||
inputs:
|
||||
lix-version:
|
||||
description: 'Version of Lix to use'
|
||||
required: true
|
||||
default: '15.8.9'
|
||||
lix-version:
|
||||
description: "Version of Lix to use"
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'build/index.js'
|
||||
using: "node20"
|
||||
main: "build/index.js"
|
||||
|
@@ -1,7 +0,0 @@
|
||||
-cp src
|
||||
-main Main
|
||||
-js build/haxe-output.js
|
||||
-dce full
|
||||
-lib hxnodejs
|
||||
-D analyzer-optimize
|
||||
--cmd yarn build
|
2559
build/index.js
2559
build/index.js
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
-D hxnodejs=10.0.0
|
||||
# @install: lix --silent download "haxelib:/hxnodejs#10.0.0" into hxnodejs/10.0.0/haxelib
|
||||
-cp ${HAXE_LIBCACHE}/hxnodejs/10.0.0/haxelib/src
|
||||
--macro allowPackage('sys')
|
||||
# should behave like other target defines and not be defined in macro context
|
||||
--macro define('nodejs')
|
20
package.json
20
package.json
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "setup-lix",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "ncc build build/haxe-output.js -o build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@actions/core": "^1.2.3",
|
||||
"@zeit/ncc": "^0.21.1"
|
||||
}
|
||||
"name": "setup-lix",
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "ncc build src/index.js -o build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@zeit/ncc": "^0.22.3"
|
||||
}
|
||||
}
|
||||
|
13
src/Main.hx
13
src/Main.hx
@@ -1,13 +0,0 @@
|
||||
import js.node.ChildProcess;
|
||||
import js.node.Buffer;
|
||||
using StringTools;
|
||||
|
||||
class Main {
|
||||
static function main() {
|
||||
var core = js.Lib.require('@actions/core');
|
||||
var version = core.getInput('lix-version');
|
||||
Sys.command('yarn', ['global', 'add', 'lix@$version']);
|
||||
var path = (ChildProcess.execSync('yarn global bin'):Buffer).toString().replace('\n', '');
|
||||
core.addPath(path);
|
||||
}
|
||||
}
|
9
src/index.js
Normal file
9
src/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const { execSync } = require("child_process");
|
||||
const core = require("@actions/core");
|
||||
const version = core.getInput("lix-version");
|
||||
execSync("npm install -g yarn");
|
||||
console.log("npx yarn global add lix" + (version ? `@${version}` : ""));
|
||||
execSync("npx yarn global add lix" + (version ? `@${version}` : ""));
|
||||
console.log("npx yarn global bin");
|
||||
const path = execSync("npx yarn global bin").toString().replaceAll("\n", "");
|
||||
core.addPath(path);
|
36
yarn.lock
36
yarn.lock
@@ -2,12 +2,32 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@actions/core@^1.2.3":
|
||||
version "1.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.3.tgz#e844b4fa0820e206075445079130868f95bfca95"
|
||||
integrity sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==
|
||||
"@actions/core@^1.9.1":
|
||||
version "1.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f"
|
||||
integrity sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==
|
||||
dependencies:
|
||||
"@actions/http-client" "^2.0.1"
|
||||
uuid "^8.3.2"
|
||||
|
||||
"@zeit/ncc@^0.21.1":
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.21.1.tgz#44fd4359c54ba34a018a5ccf7a315489db20a733"
|
||||
integrity sha512-M9WzgquSOt2nsjRkYM9LRylBLmmlwNCwYbm3Up3PDEshfvdmIfqpFNSK8EJvR18NwZjGHE5z2avlDtYQx2JQnw==
|
||||
"@actions/http-client@^2.0.1":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.1.0.tgz#b6d8c3934727d6a50d10d19f00a711a964599a9f"
|
||||
integrity sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==
|
||||
dependencies:
|
||||
tunnel "^0.0.6"
|
||||
|
||||
"@zeit/ncc@^0.22.3":
|
||||
version "0.22.3"
|
||||
resolved "https://registry.yarnpkg.com/@zeit/ncc/-/ncc-0.22.3.tgz#fca6b86b4454ce7a7e1e7e755165ec06457f16cd"
|
||||
integrity sha512-jnCLpLXWuw/PAiJiVbLjA8WBC0IJQbFeUwF4I9M+23MvIxTxk5pD4Q8byQBSPmHQjz5aBoA7AKAElQxMpjrCLQ==
|
||||
|
||||
tunnel@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
|
||||
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
|
||||
|
||||
uuid@^8.3.2:
|
||||
version "8.3.2"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
||||
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
||||
|
Reference in New Issue
Block a user