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: |
|
||||
const ver = "${{ github.ref }}".substring(19)
|
||||
const tag = "v" + ver
|
||||
var rel
|
||||
try {
|
||||
rel = await github.repos.getReleaseByTag({
|
||||
const rel = await github.repos.getReleaseByTag({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
tag: tag
|
||||
})
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(`Could not find a release for tag ${tag}.`)
|
||||
core.setFailed(`Could not find a release for tag '${tag}'.`)
|
||||
return
|
||||
}
|
||||
if (!rel.draft) {
|
||||
core.setFailed(`Release for tag ${tag} is already published.`)
|
||||
if (rel.draft) {
|
||||
core.setFailed(`Release for tag '${tag}' is already published.`)
|
||||
return
|
||||
}
|
||||
try {
|
||||
|
@ -33,7 +32,7 @@ jobs:
|
|||
repo: context.repo.repo,
|
||||
ref: 'tags/' + tag
|
||||
})
|
||||
core.setFailed(`Tag ${tag} already exists.`)
|
||||
core.setFailed(`Tag '${tag}' already exists.`)
|
||||
return
|
||||
}
|
||||
catch (error) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user