mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2024-11-24 09:11:08 +07:00
commit
0473155a56
@ -2,6 +2,7 @@ const github = require('@actions/github')
|
||||
const core = require('@actions/core')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const os = require('os')
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
@ -91,7 +92,7 @@ async function run() {
|
||||
// Check for existance of tag and abort (short circuit) if it already exists.
|
||||
for (let tag of tags.data) {
|
||||
if (tag.name === getTagName(pkg.version)) {
|
||||
core.info(`"${tag.name.trim()}" tag already exists.`)
|
||||
console.log(`"${tag.name.trim()}" tag already exists.` + os.EOL)
|
||||
core.setOutput('tagname', '')
|
||||
return
|
||||
}
|
||||
@ -124,7 +125,7 @@ async function run() {
|
||||
)
|
||||
.join('\n')
|
||||
} catch (e) {
|
||||
core.info('Failed to generate changelog from commits: ' + e.message)
|
||||
console.log('Failed to generate changelog from commits: ' + e.message + os.EOL)
|
||||
tagMsg = tagName
|
||||
}
|
||||
}
|
||||
@ -141,7 +142,7 @@ async function run() {
|
||||
type: 'commit',
|
||||
})
|
||||
|
||||
core.info(`Created new tag: ${newTag.data.tag}`)
|
||||
console.log(`Created new tag: ${newTag.data.tag}` + os.EOL)
|
||||
} catch (e) {
|
||||
core.setFailed(e.message)
|
||||
return
|
||||
@ -155,7 +156,7 @@ async function run() {
|
||||
sha: newTag.data.sha,
|
||||
})
|
||||
|
||||
core.info(`Reference ${newReference.data.ref} available at ${newReference.data.url}`)
|
||||
console.log(`Reference ${newReference.data.ref} available at ${newReference.data.url}` + os.EOL)
|
||||
} catch (e) {
|
||||
core.warning({
|
||||
...repo,
|
||||
|
@ -19,7 +19,7 @@
|
||||
"author": "ButlerLogic",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.0.0",
|
||||
"@actions/github": "^1.0.0"
|
||||
"@actions/core": "^1.2.2",
|
||||
"@actions/github": "^2.1.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user