From 778a4ca48364e664ee63ead23c402dd41d0381f2 Mon Sep 17 00:00:00 2001 From: Nevo Date: Fri, 14 Jun 2019 10:01:06 +0300 Subject: [PATCH] chore: loading .env in the release process --- .release-it.js | 6 ++++++ env.example | 1 + package-lock.json | 6 ++++++ package.json | 1 + 4 files changed, 14 insertions(+) create mode 100644 env.example diff --git a/.release-it.js b/.release-it.js index d28377b..d9cc732 100644 --- a/.release-it.js +++ b/.release-it.js @@ -1,4 +1,10 @@ +// Load env files to the process +require('dotenv').config() + module.exports = { + hooks: { + 'before:init': ['npm run test:prod'], + }, git: { tagName: 'v${version}', changelog: false, diff --git a/env.example b/env.example new file mode 100644 index 0000000..3b926cd --- /dev/null +++ b/env.example @@ -0,0 +1 @@ +GITHUB_TOKEN= diff --git a/package-lock.json b/package-lock.json index aa0d08d..e700660 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1881,6 +1881,12 @@ "is-obj": "^1.0.0" } }, + "dotenv": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.0.0.tgz", + "integrity": "sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg==", + "dev": true + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", diff --git a/package.json b/package.json index abd7e56..6311e7e 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@typescript-eslint/eslint-plugin": "^1.9.0", "@typescript-eslint/parser": "^1.9.0", "codecov": "^3.5.0", + "dotenv": "^8.0.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.3.0", "eslint-plugin-prettier": "^3.1.0",