Skip to content

Commit

Permalink
feat: add initial action
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwillox committed Dec 10, 2023
1 parent 1bd669e commit f945ea8
Show file tree
Hide file tree
Showing 10 changed files with 1,859 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# compiled output
dist/
node_modules/
build/
/out/
Expand Down
40 changes: 40 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Install Tool"
description: "Provide a description here"
branding:
icon: "download-cloud"
color: "yellow"

inputs:
preset:
description: "Preset to use for the tool"
version:
description: "Version of the tool to install"
default: "latest"
repo:
description: "Repository to use for defaults"
version_url:
description: "URL to fetch the version from"
version_regex:
description: "Regex to extract the version from the version_url"
default: "(?<version>[\\d.]+)"
download_url:
description: "URL to download the tool from"
download_name:
description: "Rename the downloaded file, runs before extraction checks"
bin_path:
description: "Sub-path of downloaded archive to add to PATH"
cache:
description: "Disable use of the tool cache"
default: "true"
token:
description: "Token to use for GitHub API requests"

outputs:
path:
description: "Path to the tool"
version:
description: "Version of the tool"

runs:
using: node20
main: dist/index.js
21 changes: 21 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "action-install-tool",
"version": "0.0.0-dev",
"description": "GitHub Actions TypeScript template",
"author": "Josh Willox <[email protected]> (https://github.com/jcwillox/)",
"license": "MIT",
"private": true,
"repository": "jcwillox/action-install-tool",
"keywords": [
"actions",
"install",
"setup",
"tool"
],
"scripts": {
"dev": "pnpm build --watch",
"build": "tsup src/index.ts --treeshake --minify --clean",
"typecheck": "tsc",
"lint": "eslint . --cache --max-warnings=0 --ext js,cjs,mjs,jsx,ts,tsx",
"lint:fix": "pnpm run lint --fix",
"format": "prettier --cache --write .",
"format:check": "prettier --cache --check ."
},
"devDependencies": {
"@actions/core": "1.10.1",
"@actions/http-client": "2.0.1",
"@actions/io": "1.1.3",
"@actions/tool-cache": "2.0.1",
"@types/node": "20.10.4",
"prettier": "3.1.1",
"radash": "11.0.0",
"tsup": "8.0.1",
"typescript": "5.3.3",
"vitest": "1.0.4"
},
"exports": {
".": "./dist/index.js"
},
"packageManager": "[email protected]",
"engines": {
"node": "^18 || ^20"
}
}
Loading

0 comments on commit f945ea8

Please sign in to comment.