forked from mirrors/action-gh-release
process import
This commit is contained in:
parent
6ef3c4f0b3
commit
e48a25bf4e
3 changed files with 5 additions and 3 deletions
|
@ -13,10 +13,11 @@ const util_1 = require("./util");
|
||||||
const github_1 = require("./github");
|
const github_1 = require("./github");
|
||||||
const core_1 = require("@actions/core");
|
const core_1 = require("@actions/core");
|
||||||
const github_2 = require("@actions/github");
|
const github_2 = require("@actions/github");
|
||||||
|
const process_1 = require("process");
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
const config = util_1.parseConfig(process.env);
|
const config = util_1.parseConfig(process_1.env);
|
||||||
if (!util_1.isTag(config.github_ref)) {
|
if (!util_1.isTag(config.github_ref)) {
|
||||||
throw new Error(`⚠️ GitHub Releases requires a tag`);
|
throw new Error(`⚠️ GitHub Releases requires a tag`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"@types/glob": "^7.1.1",
|
"@types/glob": "^7.1.1",
|
||||||
"@types/jest": "^24.0.13",
|
"@types/jest": "^24.0.13",
|
||||||
"@types/mime": "^2.0.1",
|
"@types/mime": "^2.0.1",
|
||||||
"@types/node": "^12.0.4",
|
"@types/node": "^12.7.4",
|
||||||
"jest": "^24.8.0",
|
"jest": "^24.8.0",
|
||||||
"jest-circus": "^24.7.1",
|
"jest-circus": "^24.7.1",
|
||||||
"ts-jest": "^24.0.2",
|
"ts-jest": "^24.0.2",
|
||||||
|
|
|
@ -3,10 +3,11 @@ import { paths, parseConfig, isTag } from './util';
|
||||||
import { release, upload } from './github';
|
import { release, upload } from './github';
|
||||||
import { setFailed } from '@actions/core';
|
import { setFailed } from '@actions/core';
|
||||||
import { GitHub } from '@actions/github';
|
import { GitHub } from '@actions/github';
|
||||||
|
import { env } from 'process';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
const config = parseConfig(process.env);
|
const config = parseConfig(env);
|
||||||
if (!isTag(config.github_ref)) {
|
if (!isTag(config.github_ref)) {
|
||||||
throw new Error(`⚠️ GitHub Releases requires a tag`);
|
throw new Error(`⚠️ GitHub Releases requires a tag`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue