From b3468fa5e8da02a3a3fe7acf90ded7b19538b778 Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Sun, 10 Nov 2019 08:03:06 -0500 Subject: [PATCH] feat: build dist folder --- .gitignore | 1 + action.yml | 2 +- package-lock.json | 6 ++++++ package.json | 10 ++++++---- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c2658d7d1..940d56a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +dist diff --git a/action.yml b/action.yml index 84a606d26..a89e7a5c9 100644 --- a/action.yml +++ b/action.yml @@ -9,7 +9,7 @@ inputs: default: false runs: using: 'node12' - main: 'index.js' + main: 'dist/index.js' branding: color: 'green' icon: 'check-square' diff --git a/package-lock.json b/package-lock.json index 76d3a7ed2..4e2ec0690 100644 --- a/package-lock.json +++ b/package-lock.json @@ -302,6 +302,12 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "dev": true }, + "@zeit/ncc": { + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.20.5.tgz", + "integrity": "sha512-XU6uzwvv95DqxciQx+aOLhbyBx/13ky+RK1y88Age9Du3BlA4mMPCy13BGjayOrrumOzlq1XV3SD/BWiZENXlw==", + "dev": true + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", diff --git a/package.json b/package.json index cf9588a93..f709f936a 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,15 @@ "version": "0.0.0-development", "description": "GitHub Action for running Cypress end-to-end tests", "private": false, - "main": "index.js", + "main": "dist/index.js", "files": [ - "index.js", + "dist", "action.yml" ], "scripts": { "test": "echo \"There are no tests :(\"", - "semantic-release": "semantic-release" + "build-for-release": "ncc build -o dist index.js && git add -f dist", + "semantic-release": "npm run build-for-release && semantic-release" }, "repository": { "type": "git", @@ -33,8 +34,9 @@ "hasha": "5.1.0" }, "devDependencies": { - "prettier": "1.19.1", "@types/node": "^12.0.4", + "@zeit/ncc": "0.20.5", + "prettier": "1.19.1", "semantic-release": "^15.13.30" }, "publishConfig": {