mirror of
https://github.com/actions-rs/cargo.git
synced 2025-08-15 13:15:12 +00:00
Update
This commit is contained in:
parent
9e8dbc86a6
commit
8cdba315b7
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:prettier/recommended",
|
|
||||||
"prettier"
|
|
||||||
]
|
|
||||||
}
|
|
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -11,6 +11,4 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
# - run: npm run lint
|
|
||||||
- run: npm run build
|
|
||||||
- run: npm run test
|
- run: npm run test
|
||||||
|
8733
package-lock.json
generated
8733
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
25
package.json
25
package.json
@ -1,46 +1,29 @@
|
|||||||
{
|
{
|
||||||
"name": "action-cargo",
|
"name": "action-cargo",
|
||||||
"version": "1.0.3",
|
"version": "0.0.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Run cargo command",
|
"description": "Run cargo command",
|
||||||
"main": "src/main.js",
|
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"main": "src/main.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bundle": "cp -r .matchers ./dist/",
|
"test": "NODE_OPTIONS=--experimental-vm-modules npx jest -c jest.config.json"
|
||||||
"build": "npm run bundle",
|
|
||||||
"format": "prettier --write 'src/**/*.ts' '__tests__/**/*.ts'",
|
|
||||||
"lint": "tsc --noEmit && eslint 'src/**/*.ts' '__tests__/**/*.ts'",
|
|
||||||
"test": "jest -c jest.config.json"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/actions-rs/cargo.git"
|
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"actions",
|
"actions",
|
||||||
"rust",
|
"rust",
|
||||||
"cargo"
|
"cargo"
|
||||||
],
|
],
|
||||||
"author": "actions-rs",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/actions-rs/cargo/issues"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.4",
|
"@actions/core": "^1.2.4",
|
||||||
"action-core": "git+https://github.com/synthet-ic/action-core.git",
|
"action-core": "git+https://github.com/synthet-ic/action-core.git",
|
||||||
"string-argv": "^0.3.1"
|
"string-argv": "^0.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.34.0",
|
|
||||||
"eslint-config-prettier": "^8.6.0",
|
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
|
||||||
"jest": "^29.4.2",
|
"jest": "^29.4.2",
|
||||||
"jest-circus": "^29.4.2",
|
"jest-circus": "^29.4.2"
|
||||||
"npm-check-updates": "^16.7.4",
|
|
||||||
"prettier": "^2.8.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import { input } from "action-core";
|
import { input } from "action-core";
|
||||||
|
|
||||||
import stringArgv from "string-argv";
|
import { parseArgsStringToArgv } from "string-argv";
|
||||||
|
|
||||||
// Parsed action input
|
// Parsed action input
|
||||||
// export interface Input {
|
// export interface Input {
|
||||||
@ -16,7 +16,7 @@ import stringArgv from "string-argv";
|
|||||||
|
|
||||||
export function get() {
|
export function get() {
|
||||||
const command = input.getInput("command", { required: true });
|
const command = input.getInput("command", { required: true });
|
||||||
const args = stringArgv(input.getInput("args"));
|
const args = parseArgsStringToArgv(input.getInput("args"));
|
||||||
let toolchain = input.getInput("toolchain");
|
let toolchain = input.getInput("toolchain");
|
||||||
if (toolchain.startsWith("+")) {
|
if (toolchain.startsWith("+")) {
|
||||||
toolchain = toolchain.slice(1);
|
toolchain = toolchain.slice(1);
|
||||||
|
@ -30,7 +30,7 @@ async function main() {
|
|||||||
try {
|
try {
|
||||||
await run(actionInput);
|
await run(actionInput);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed((<Error>error).message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user