chore: remove compiled imputs

This commit is contained in:
Federico Grandi
2020-11-29 17:41:48 +01:00
parent ea1d3cefff
commit 3ed8463058
6 changed files with 3 additions and 25 deletions

View File

@@ -29,10 +29,3 @@ jobs:
add: lib
env:
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

View File

@@ -4,11 +4,10 @@
"description": "Add & commit files from a path directly from GitHub Actions",
"main": "lib/index.js",
"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",
"all-contributors-badge": "ts-node scripts/all-contributors-badge",
"changelog": "ts-node scripts/changelog.ts",
"inputs": "ts-node scripts/inputs.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"husky": {

View File

@@ -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())

View File

@@ -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'

View File

@@ -3,7 +3,7 @@ import axios from 'axios'
import path from 'path'
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 git = simpleGit({ baseDir })