Skip to content

Commit

Permalink
Merge pull request #2 from calcit-lang/debug
Browse files Browse the repository at this point in the history
preparing for 0.0.2
  • Loading branch information
tiye committed Mar 7, 2024
2 parents 6ee0760 + a77b9a3 commit 78e6da8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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 .
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ inputs:
runs:
using: node20
main: dist/index.js

icon: arrow-up-circle
branding:
icon: cloud-snow
color: #ccf
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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));
Expand All @@ -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();
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 78e6da8

Please sign in to comment.