From 42e514b7559f25aba5e154e2e0463928d483c681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bure=C5=A1?= Date: Wed, 20 Nov 2019 14:07:49 +0100 Subject: [PATCH] Add actions/core --- index.js | 5 +++-- package-lock.json | 5 +++++ package.json | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 8f0bbbf..88fe514 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +const core = require('@actions/core') const { Toolkit } = require('actions-toolkit') const { execSync } = require('child_process') @@ -6,8 +7,6 @@ Toolkit.run(async tools => { const pkg = tools.getPackageJSON() const event = tools.context.payload - console.log('info', tools.arguments) - const messages = event.commits.map(commit => commit.message + '\n' + commit.body) const commitMessage = 'version bump to' @@ -24,6 +23,8 @@ Toolkit.run(async tools => { version = 'minor' } + const tagPrefix = core.getInput('tag-prefix') + try { const current = pkg.version.toString() // set git user diff --git a/package-lock.json b/package-lock.json index decbd04..896eaeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@actions/core": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz", + "integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==" + }, "@babel/code-frame": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", diff --git a/package.json b/package.json index f614022..432305f 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "test": "jest" }, "dependencies": { + "@actions/core": "^1.2.0", "actions-toolkit": "^2.2.0", "yargs": "^14.2.0" },