3 Commits

Author SHA1 Message Date
64f07b51ff install yarn 2025-09-09 09:41:53 -05:00
66238e0949 don't run CI right now 2025-09-09 09:41:18 -05:00
Kevin Leung
5d98ddc5d0 Remove hardcoded version (#11)
* Just write simple js

* run ci on all branches

* no longer require version

* still need bundling

* use bundled one
2025-02-24 16:54:49 +11:00
10 changed files with 57 additions and 85 deletions

View File

@@ -2,9 +2,7 @@ name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
@@ -12,13 +10,13 @@ jobs:
strategy:
matrix:
os:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- uses: actions/checkout@v2
- uses: ./
- run: lix
- run: lix install haxe stable
- uses: actions/checkout@v2
- uses: ./
- run: lix
- run: lix install haxe stable

3
.gitignore vendored
View File

@@ -1,2 +1 @@
node_modules
build/haxe-output.js
node_modules

View File

@@ -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.12.0'
lix-version:
description: "Version of Lix to use"
runs:
using: 'node20'
main: 'build/index.js'
using: "node20"
main: "build/index.js"

View File

@@ -1,7 +0,0 @@
-cp src
-main Main
-js build/haxe-output.js
-dce full
-lib hxnodejs
-D analyzer-optimize
--cmd yarn build

View File

@@ -19,7 +19,13 @@ module.exports =
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ var threw = true;
/******/ try {
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ threw = false;
/******/ } finally {
/******/ if(threw) delete installedModules[moduleId];
/******/ }
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
@@ -34,7 +40,7 @@ module.exports =
/******/ // the startup function
/******/ function startup() {
/******/ // Load entry module and return exports
/******/ return __webpack_require__(475);
/******/ return __webpack_require__(676);
/******/ };
/******/
/******/ // run startup
@@ -1981,29 +1987,6 @@ Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function
Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });
//# sourceMappingURL=core.js.map
/***/ }),
/***/ 475:
/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {
// Generated by Haxe 4.0.5
(function ($global) { "use strict";
var Main = function() { };
Main.main = function() {
var core = __webpack_require__(470);
js_node_ChildProcess.execSync("yarn global add lix@" + core.getInput("lix-version"));
var path = StringTools.replace(js_node_ChildProcess.execSync("yarn global bin").toString(),"\n","");
core.addPath(path);
};
var StringTools = function() { };
StringTools.replace = function(s,sub,by) {
return s.split(sub).join(by);
};
var js_node_ChildProcess = __webpack_require__(129);
Main.main();
})({});
/***/ }),
/***/ 498:
@@ -2512,6 +2495,20 @@ exports.summary = _summary;
module.exports = require("util");
/***/ }),
/***/ 676:
/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {
const { execSync } = __webpack_require__(129);
const core = __webpack_require__(470);
const version = core.getInput("lix-version");
execSync("npm install -g yarn");
execSync("yarn global add lix" + (version ? `@${version}` : ""));
const path = execSync("yarn global bin").toString().replaceAll("\n", "");
core.addPath(path);
/***/ }),
/***/ 695:

View File

@@ -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')

View File

@@ -1,12 +1,12 @@
{
"name": "setup-lix",
"version": "1.0.1",
"license": "MIT",
"scripts": {
"build": "ncc build build/haxe-output.js -o build"
},
"devDependencies": {
"@actions/core": "^1.9.1",
"@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"
}
}

View File

@@ -1,14 +0,0 @@
import sys.FileSystem;
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');
ChildProcess.execSync('yarn global add lix@$version');
var path = (ChildProcess.execSync('yarn global bin'):Buffer).toString().replace('\n', '');
core.addPath(path);
}
}

7
src/index.js Normal file
View File

@@ -0,0 +1,7 @@
const { execSync } = require("child_process");
const core = require("@actions/core");
const version = core.getInput("lix-version");
execSync("npm install -g yarn");
execSync("yarn global add lix" + (version ? `@${version}` : ""));
const path = execSync("yarn global bin").toString().replaceAll("\n", "");
core.addPath(path);

View File

@@ -17,10 +17,10 @@
dependencies:
tunnel "^0.0.6"
"@zeit/ncc@^0.21.1":
version "0.21.1"
resolved "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.21.1.tgz"
integrity sha512-M9WzgquSOt2nsjRkYM9LRylBLmmlwNCwYbm3Up3PDEshfvdmIfqpFNSK8EJvR18NwZjGHE5z2avlDtYQx2JQnw==
"@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"