Compare commits
No commits in common. "be3cb4b2590091dbaf5ce0d861da0f7979c5fc23" and "43287ec9cf5ac53203e617b06fa1215a57f62d83" have entirely different histories.
be3cb4b259
...
43287ec9cf
11
.github/workflows/publish-release.yml
vendored
11
.github/workflows/publish-release.yml
vendored
|
@ -11,20 +11,19 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
const ver = "${{ github.ref }}".substring(19)
|
const ver = "${{ github.ref }}".substring(19)
|
||||||
const tag = "v" + ver
|
const tag = "v" + ver
|
||||||
var rel
|
|
||||||
try {
|
try {
|
||||||
rel = await github.repos.getReleaseByTag({
|
const rel = await github.repos.getReleaseByTag({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
tag: tag
|
tag: tag
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`Could not find a release for tag ${tag}.`)
|
core.setFailed(`Could not find a release for tag '${tag}'.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!rel.draft) {
|
if (rel.draft) {
|
||||||
core.setFailed(`Release for tag ${tag} is already published.`)
|
core.setFailed(`Release for tag '${tag}' is already published.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -33,7 +32,7 @@ jobs:
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
ref: 'tags/' + tag
|
ref: 'tags/' + tag
|
||||||
})
|
})
|
||||||
core.setFailed(`Tag ${tag} already exists.`)
|
core.setFailed(`Tag '${tag}' already exists.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user