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 { Toolkit } = require('actions-toolkit')
const { execSync } = require('child_process') const { execSync } = require('child_process')
@ -6,8 +7,6 @@ Toolkit.run(async tools => {
const pkg = tools.getPackageJSON() const pkg = tools.getPackageJSON()
const event = tools.context.payload const event = tools.context.payload
console.log('info', tools.arguments)
const messages = event.commits.map(commit => commit.message + '\n' + commit.body) const messages = event.commits.map(commit => commit.message + '\n' + commit.body)
const commitMessage = 'version bump to' const commitMessage = 'version bump to'
@ -24,6 +23,8 @@ Toolkit.run(async tools => {
version = 'minor' version = 'minor'
} }
const tagPrefix = core.getInput('tag-prefix')
try { try {
const current = pkg.version.toString() const current = pkg.version.toString()
// set git user // set git user

5
package-lock.json generated
View File

@ -4,6 +4,11 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "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": { "@babel/code-frame": {
"version": "7.5.5", "version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",

View File

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