mirror of
https://github.com/extractions/setup-just
synced 2026-09-07 20:04:00 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95b912dc5d | ||
|
|
8eeb0a1f9c | ||
|
|
8843f3ad27 | ||
|
|
bd335a2937 | ||
|
|
5675d4c3ba | ||
|
|
7fef8ee4ca |
@@ -1,6 +1,9 @@
|
||||
name: build
|
||||
|
||||
on: push
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: 0 12 1 * *
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -9,8 +12,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- run: npm install --global @zeit/ncc
|
||||
node-version: '18'
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm run build
|
||||
@@ -35,7 +37,7 @@ jobs:
|
||||
needs: test-latest
|
||||
strategy:
|
||||
matrix:
|
||||
just-version: [0.4.5, 0.5.11, 0.6.1, 0.7.3, 0.8.3]
|
||||
just-version: [0.5.11, 0.6.1, 0.7.3, 0.8.7, 0.9.9, 0.10.7, 0.11.2, 1.5.0]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -46,7 +48,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Check version
|
||||
run: just --version | grep "^just v${{ matrix.just-version }}$"
|
||||
run: just --version | grep -E "^just v?${{ matrix.just-version }}$"
|
||||
- name: Test
|
||||
run: |
|
||||
[ "$(just --justfile tests/Justfile)" = "Test..." ]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/runner
|
||||
|
||||
# Created by https://www.gitignore.io/api/node
|
||||
# Edit at https://www.gitignore.io/?templates=node
|
||||
|
||||
@@ -1,12 +1,39 @@
|
||||
# `setup-just` action
|
||||
# 🤖 `setup-just` action
|
||||
|
||||

|
||||
|
||||
This GitHub Action will install the latest release of the
|
||||
This GitHub Action will install a release of the
|
||||
[just](https://github.com/casey/just) command runner for you.
|
||||
|
||||
## Usage
|
||||
|
||||
### Examples
|
||||
|
||||
In most cases all you will need is the following in your workflow.
|
||||
|
||||
```yaml
|
||||
- uses: extractions/setup-just@v1
|
||||
```
|
||||
|
||||
If you want a specific version of `just` you can specify this by passing the
|
||||
`just-version` input.
|
||||
|
||||
```yaml
|
||||
- uses: extractions/setup-just@v1
|
||||
with:
|
||||
just-version: '1.4.0'
|
||||
```
|
||||
|
||||
In rare circumstances you might get rate limiting errors, this is because this
|
||||
workflow has to make requests to GitHub API in order to list available releases.
|
||||
If this happens you can set the `GITHUB_TOKEN` environment variable.
|
||||
|
||||
```yaml
|
||||
- uses: extractions/setup-just@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
### Inputs
|
||||
|
||||
| Name | Required | Description | Type | Default |
|
||||
@@ -18,23 +45,37 @@ package](https://www.npmjs.com/package/semver). This GitHub Action will install
|
||||
the latest matching release. Examples include
|
||||
|
||||
- `just-version: '*'` latest version (default).
|
||||
- `just-version: '0.8'` equivalent to `>=0.8.0 <0.9.0`.
|
||||
- `just-version: '0.8.x'` equivalent to `>=0.8.0 <0.9.0`.
|
||||
- `just-version: '0.8.3'` equivalent to `=0.8.3`.
|
||||
- `just-version: '^0.8.3'` equivalent to `>=0.8.3 <0.9.0`.
|
||||
- `just-version: '0.10'` equivalent to `>=0.10.0 <0.11.0`.
|
||||
- `just-version: '0.10.x'` equivalent to `>=0.10.0 <0.11.0`.
|
||||
- `just-version: '0.10.0'` equivalent to `=0.10.0`.
|
||||
- `just-version: '^0.10.0'` equivalent to `>=0.10.0 <0.11.0`.
|
||||
|
||||
### Basic example
|
||||
## Development
|
||||
|
||||
Add the following to your workflow.
|
||||
Most of the installation logic is done in a shared library located at
|
||||
[@extractions/setup-crate](https://github.com/extractions/setup-crate).
|
||||
|
||||
```yaml
|
||||
- uses: extractions/setup-just@v1
|
||||
with:
|
||||
just-version: 0.8
|
||||
env:
|
||||
# this is not required but add it if you get any rate limiting issues
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
The following commands are useful for development.
|
||||
|
||||
- `npm i`
|
||||
|
||||
Install all dependencies.
|
||||
|
||||
- `npm run fmt`
|
||||
|
||||
Format the source code.
|
||||
|
||||
- `npm run lint`
|
||||
|
||||
Run all lints.
|
||||
|
||||
- `npm run run`
|
||||
|
||||
Test the action by running it.
|
||||
|
||||
- `npm run build`
|
||||
|
||||
Build the action and update `dist/`.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ inputs:
|
||||
just-version:
|
||||
description: 'A valid semver specifier of the just version to install'
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'dist/index.js'
|
||||
|
||||
Vendored
+7
-1
File diff suppressed because one or more lines are too long
Generated
+1159
-1245
File diff suppressed because it is too large
Load Diff
+13
-12
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "setup-just",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"description": "Install the just command runner",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"fmt": "node node_modules/.bin/prettier --write **/*.ts",
|
||||
"lint": "node node_modules/.bin/eslint **/*.ts",
|
||||
"fmt": "prettier --write **/*.ts",
|
||||
"lint": "eslint **/*.ts",
|
||||
"build": "rm -rf dist/ && ncc build src/index.ts --minify",
|
||||
"run": "npm run build && RUNNER_TOOL_CACHE=./runner/cache RUNNER_TEMP=./runner/temp node dist/index.js"
|
||||
},
|
||||
@@ -20,16 +20,17 @@
|
||||
},
|
||||
"homepage": "https://github.com/extractions/setup-just#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@extractions/setup-crate": "^0.2.1"
|
||||
"@actions/core": "^1.9.1",
|
||||
"@extractions/setup-crate": "^0.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.11.6",
|
||||
"@types/semver": "^7.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^4.4.0",
|
||||
"@typescript-eslint/parser": "^4.4.0",
|
||||
"eslint": "^7.10.0",
|
||||
"prettier": "^2.1.2",
|
||||
"typescript": "^4.0.3"
|
||||
"@types/node": "^18.7.21",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.38.0",
|
||||
"@typescript-eslint/parser": "^5.38.0",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"eslint": "^8.24.0",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "^4.8.3"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -12,7 +12,9 @@ async function main() {
|
||||
core.addPath(tool.dir);
|
||||
core.info(`Successfully setup ${tool.name} v${tool.version}`);
|
||||
} catch (err) {
|
||||
core.setFailed(err.message);
|
||||
if (err instanceof Error) {
|
||||
core.setFailed(err.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
|
||||
/* Module Resolution Options */
|
||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||
|
||||
Reference in New Issue
Block a user