Add actions/core

This commit is contained in:
Michal Bureš 2019-11-20 14:07:49 +01:00
parent 02fc217bec
commit 42e514b755
3 changed files with 9 additions and 2 deletions

View File

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

5
package-lock.json generated
View File

@ -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",

View File

@ -19,6 +19,7 @@
"test": "jest"
},
"dependencies": {
"@actions/core": "^1.2.0",
"actions-toolkit": "^2.2.0",
"yargs": "^14.2.0"
},