exp
This commit is contained in:
parent
b893475bf9
commit
74f650bb33
7
.github/workflows/publish-release.js
vendored
7
.github/workflows/publish-release.js
vendored
|
@ -16,6 +16,7 @@ module.exports = /*async*/ ({github, context, core}) => {
|
||||||
const version = context.payload.inputs.version
|
const version = context.payload.inputs.version
|
||||||
const tag = "v" + version
|
const tag = "v" + version
|
||||||
console.log(`Validate version '${version}'.`)
|
console.log(`Validate version '${version}'.`)
|
||||||
|
try {
|
||||||
const release = restapi.repos.getReleaseByTag({
|
const release = restapi.repos.getReleaseByTag({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
@ -29,6 +30,12 @@ module.exports = /*async*/ ({github, context, core}) => {
|
||||||
core.setFailed(`GitHub release for tag '${tag}' is already published.`)
|
core.setFailed(`GitHub release for tag '${tag}' is already published.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (error)
|
||||||
|
{
|
||||||
|
core.setFailed(`Could not find a GitHub release for tag '${tag}'.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const ref = await restapi.git.getRef({
|
const ref = await restapi.git.getRef({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user