From a77b9a3792c62722ad4b068fc5b2b9c9f11119db Mon Sep 17 00:00:00 2001 From: tiye Date: Fri, 8 Mar 2024 02:35:29 +0800 Subject: [PATCH] preparing for 0.0.2 --- README.md | 6 +++++- action.yml | 5 +++++ index.js | 8 ++++++-- package.json | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 48f1eeb..e0789e3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ ## Action to setup Calcit ```yml -TODO +- uses: calcit-lang/setup-cr@0.0.2 + with: + version: "0.8.38" ``` + +Find latest version on https://github.com/calcit-lang/calcit/releases . diff --git a/action.yml b/action.yml index ea46829..fffc38b 100644 --- a/action.yml +++ b/action.yml @@ -9,3 +9,8 @@ inputs: runs: using: node20 main: dist/index.js + +icon: arrow-up-circle +branding: + icon: cloud-snow + color: #ccf diff --git a/index.js b/index.js index 9022803..48dbee7 100644 --- a/index.js +++ b/index.js @@ -11,10 +11,11 @@ let getCapsDownloadUrl = (version) => { return `https://github.com/calcit-lang/calcit/releases/download/${version}/caps`; }; +const version = core.getInput("version"); + async function setup() { try { // Get version of tool to be installed - const version = core.getInput("version"); const pathToCr = await tc.downloadTool( getCrDownloadUrl(version), @@ -25,6 +26,9 @@ async function setup() { "/home/runner/bin/caps" ); + // TODO cache + // https://github.com/actions/toolkit/tree/main/packages/tool-cache#cache + // Expose the tool by adding it to the PATH fs.chmodSync(pathToCr, 0o755); core.addPath(path.dirname(pathToCr)); @@ -42,6 +46,6 @@ async function setup() { module.exports = setup; if (require.main === module) { - console.log("Running setup"); + console.log(`Setting up Calcit ${version}`); setup(); } diff --git a/package.json b/package.json index 1c98aab..490abdd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-cr", - "version": "0.0.1", + "version": "0.0.2", "description": "Setup Calcit runtime", "main": "./index.js", "repository": "git@github.com:calcit-lang/setup-cr.git",