19 Commits
Author SHA1 Message Date
Ross MacArthur d5f282aa17 Convert to composite action 2025-03-15 15:07:50 +02:00
Christian Clauss 6e1de3cc40 Keep GitHub Actions up to date with GitHub's Dependabot (#14)
This will automate the creation of pull requests like
* casey/just#1871

Docs:
* https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
* https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
version: 2
2024-05-18 14:11:43 +02:00
Tim Chan d91bfae12f doc: update example code with the latest gha version (#16) 2024-03-31 10:30:07 +02:00
Ross MacArthur dd310ad5a9 This is 2.0.0 2024-02-27 23:40:39 +02:00
Ross MacArthur b88c09d1cb Upgrade GitHub Actions 2024-02-27 23:39:49 +02:00
Ross MacArthur dcec242065 Upgrade dependencies 2024-02-27 23:39:06 +02:00
Ross MacArthur fbd91a81bd Use Node v20 2024-02-27 23:37:20 +02:00
Christian Clauss 502448742b Build: just v1.23.0 (#15) 2024-02-27 23:35:39 +02:00
Adam Jensen 1b96160c16 doc: Fix invalid GHA syntax in github-token example (#12) 2023-03-22 14:19:49 +02:00
Ross MacArthur 69d82fb023 This is 1.6.0 2023-02-12 09:16:03 +02:00
Ross MacArthur f1404cf972 Test by passing github-token instead of env 2023-02-12 09:14:10 +02:00
Ross MacArthur 82fe2e1caf Update README 2023-02-12 09:07:30 +02:00
Simon Sorensen ad659545e1 Use github token by default to authenticate download (#11) 2023-02-11 15:57:03 +02:00
Ross MacArthur 95b912dc5d This is 1.5.0 2022-09-25 21:46:03 +02:00
Ross MacArthur 8eeb0a1f9c Test latest versions and run tests once a month 2022-09-25 21:42:57 +02:00
Ross MacArthur 8843f3ad27 Upgrade dependencies 2022-09-25 21:39:40 +02:00
Ross MacArthur bd335a2937 Fix README 2021-09-13 18:39:17 +02:00
Ross MacArthur 5675d4c3ba Maintenance updates
- Add development section to README.
- Add `ncc` as a dev dependency.
- Test latest versions of `just`.
2021-08-23 22:35:16 +02:00
Ross MacArthur 7fef8ee4ca Update README and test version 0.9.0. 2021-03-31 09:25:55 +02:00
11 changed files with 76 additions and 3658 deletions
-24
View File
@@ -1,24 +0,0 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}
+13
View File
@@ -0,0 +1,13 @@
# Keep GitHub Actions up to date with GitHub's Dependabot...
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
version: 2
updates:
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: weekly
+9 -20
View File
@@ -1,27 +1,18 @@
name: build
on: push
on:
push:
schedule:
- cron: 0 12 1 * *
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm install --global @zeit/ncc
- run: npm ci
- run: npm run lint
- run: npm run build
test-latest:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup just
uses: ./
env:
@@ -34,19 +25,17 @@ jobs:
test-version:
needs: test-latest
strategy:
matrix:
just-version: [0.4.5, 0.5.11, 0.6.1, 0.7.3, 0.8.3]
matrix: # https://github.com/casey/just/releases
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, 1.23.0, 1.40.0]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run self
uses: ./
with:
just-version: ${{ matrix.just-version }}
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 -112
View File
@@ -1,112 +1 @@
# Created by https://www.gitignore.io/api/node
# Edit at https://www.gitignore.io/?templates=node
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# rollup.js default build output
dist/*
!dist/index.js
# Uncomment the public line if your project uses Gatsby
# https://nextjs.org/blog/next-9-1#public-directory-support
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
# public
# Storybook build outputs
.out
.storybook-out
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# Temporary folders
tmp/
temp/
# End of https://www.gitignore.io/api/node
/runner
+42 -21
View File
@@ -1,40 +1,61 @@
# `setup-just` action
# 🤖 `setup-just` action
![build](https://img.shields.io/github/workflow/status/extractions/setup-just/build)
[![Build Status](https://img.shields.io/github/actions/workflow/status/extractions/setup-just/build.yaml?branch=trunk)](https://github.com/extractions/setup-just/actions/workflows/build.yaml)
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@v2
```
If you want a specific version of `just` you can specify this by passing the
`just-version` input.
```yaml
- uses: extractions/setup-just@v2
with:
just-version: '1.40.0'
```
To avoid rate-limiting, the default Github token available to all actions, is
automatically used to authenticate calls to Github. To override it, pass the
input `github-token`.
```yaml
- uses: extractions/setup-just@v2
with:
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
```
### Inputs
| Name | Required | Description | Type | Default |
| -------------- | -------- | --------------------------------------- | ------ | ------- |
| `just-version` | no | A valid NPM-style semver specification. | string | * |
| Name | Required | Description | Type | Default |
| -------------- | -------- | -------------------------------------------- | ------ | --------------------- |
| `just-version` | no | A valid NPM-style semver specification. | string | * |
| `github-token` | no | A Github token to authenticate API requests. | string | `${{ github.token }}` |
The semver specification is passed directly to NPM's [semver
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: '1'` equivalent to `>=1.0.0 <2.0.0`.
- `just-version: '1.2'` equivalent to `>=1.2.0 <2.0.0`.
- `just-version: '1.2.3'` equivalent to `=1.2.3`.
- `just-version: '^1.2.3'` equivalent to `>=1.2.3 <2.0.0`.
### Basic example
## Development
Add the following to your workflow.
```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 }}
```
This action is a composite action and the installation logic is done in a shared
library located at
[@extractions/setup-crate](https://github.com/extractions/setup-crate).
## License
+11 -2
View File
@@ -7,6 +7,15 @@ branding:
inputs:
just-version:
description: 'A valid semver specifier of the just version to install'
github-token:
description: 'Github token to use to authenticate downloads'
required: false
default: ${{ github.token }}
runs:
using: 'node12'
main: 'dist/index.js'
using: composite
steps:
- uses: extractions/setup-crate@v1
with:
repo: casey/just
version: ${{ inputs.just-version }}
github-token: ${{ inputs.github-token }}
-1
View File
File diff suppressed because one or more lines are too long
-3358
View File
File diff suppressed because it is too large Load Diff
-35
View File
@@ -1,35 +0,0 @@
{
"name": "setup-just",
"version": "1.4.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",
"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"
},
"repository": {
"type": "git",
"url": "git+https://github.com/extractions/setup-just.git"
},
"author": "Ross MacArthur <ross@macarthur.io>",
"license": "MIT OR Apache-2.0",
"bugs": {
"url": "https://github.com/extractions/setup-just/issues"
},
"homepage": "https://github.com/extractions/setup-just#readme",
"dependencies": {
"@actions/core": "^1.2.6",
"@extractions/setup-crate": "^0.2.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"
}
}
-19
View File
@@ -1,19 +0,0 @@
import * as core from "@actions/core";
import * as setup from "@extractions/setup-crate";
async function main() {
try {
const versionSpec = core.getInput("just-version");
const tool = await setup.checkOrInstallTool({
owner: "casey",
name: "just",
versionSpec,
});
core.addPath(tool.dir);
core.info(`Successfully setup ${tool.name} v${tool.version}`);
} catch (err) {
core.setFailed(err.message);
}
}
main();
-66
View File
@@ -1,66 +0,0 @@
{
"compilerOptions": {
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "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). */
// "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. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
/* Advanced Options */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
}