Compare commits
4 Commits
master
...
release/4.
Author | SHA1 | Date | |
---|---|---|---|
|
be3cb4b259 | ||
|
788aa0d4b5 | ||
|
490cc0c703 | ||
|
cfd959c2e0 |
11
.github/workflows/publish-release.yml
vendored
11
.github/workflows/publish-release.yml
vendored
|
@ -11,19 +11,20 @@ jobs:
|
|||
script: |
|
||||
const ver = "${{ github.ref }}".substring(19)
|
||||
const tag = "v" + ver
|
||||
var rel
|
||||
try {
|
||||
const rel = await github.repos.getReleaseByTag({
|
||||
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 {
|
||||
|
@ -32,7 +33,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