chore: remove compiled imputs
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -29,10 +29,3 @@ jobs:
|
|||||||
add: lib
|
add: lib
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: EndBug/add-and-commit@v4
|
|
||||||
with:
|
|
||||||
message: '[auto] build: update input typings'
|
|
||||||
add: src/inputs.ts
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -4,11 +4,10 @@
|
|||||||
"description": "Add & commit files from a path directly from GitHub Actions",
|
"description": "Add & commit files from a path directly from GitHub Actions",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run inputs && ncc build src/main.ts --minify --out lib",
|
"build": "ncc build src/main.ts --minify --out lib",
|
||||||
"watch": "ncc build src/main.ts --watch --out lib",
|
"watch": "ncc build src/main.ts --watch --out lib",
|
||||||
"all-contributors-badge": "ts-node scripts/all-contributors-badge",
|
"all-contributors-badge": "ts-node scripts/all-contributors-badge",
|
||||||
"changelog": "ts-node scripts/changelog.ts",
|
"changelog": "ts-node scripts/changelog.ts",
|
||||||
"inputs": "ts-node scripts/inputs.ts",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
import YAML from 'yamljs'
|
|
||||||
import fs from 'fs'
|
|
||||||
|
|
||||||
const actionManifest = YAML.load('action.yml'),
|
|
||||||
inputs = Object.keys(actionManifest?.inputs || {})
|
|
||||||
|
|
||||||
fs.writeFileSync('src/inputs.ts', `
|
|
||||||
// WARNING: this file is auto-generated by scripts/inputs.ts (npm run inputs), any manual edit will be overwritten.
|
|
||||||
|
|
||||||
export type Input = ${inputs.map(s => `'${s}'`).join(' | ')}
|
|
||||||
`.trimLeft())
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
// WARNING: this file is auto-generated by scripts/inputs.ts (npm run inputs), any manual edit will be overwritten.
|
|
||||||
|
|
||||||
export type Input = 'add' | 'author_name' | 'author_email' | 'branch' | 'cwd' | 'message' | 'pull_strategy' | 'push' | 'remove' | 'signoff' | 'tag'
|
|
||||||
@@ -3,7 +3,7 @@ import axios from 'axios'
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import simpleGit, { Response } from 'simple-git'
|
import simpleGit, { Response } from 'simple-git'
|
||||||
|
|
||||||
import { Input } from './inputs'
|
type Input = 'add' | 'author_name' | 'author_email' | 'branch' | 'cwd' | 'message' | 'pull_strategy' | 'push' | 'remove' | 'signoff' | 'tag'
|
||||||
|
|
||||||
const baseDir = path.join(process.cwd(), getInput('cwd') || '')
|
const baseDir = path.join(process.cwd(), getInput('cwd') || '')
|
||||||
const git = simpleGit({ baseDir })
|
const git = simpleGit({ baseDir })
|
||||||
|
|||||||
Reference in New Issue
Block a user