wtf
This commit is contained in:
parent
0865ac62e2
commit
95a34adfba
30
.github/workflows/publish-release.yml
vendored
30
.github/workflows/publish-release.yml
vendored
|
@ -24,34 +24,29 @@ jobs:
|
|||
script: |
|
||||
const ver = "${{ github.ref }}".substring(19)
|
||||
const tag = "v" + ver
|
||||
var rel
|
||||
var rels
|
||||
var rel = null
|
||||
try {
|
||||
rels = await github.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
})
|
||||
// this does *not* return draft releases
|
||||
//rel = await github.repos.getReleaseByTag({
|
||||
// owner: context.repo.owner,
|
||||
// repo: context.repo.repo,
|
||||
// tag: tag
|
||||
//})
|
||||
const rels = await github.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
})
|
||||
for (var r in rels.data) {
|
||||
if (r.tag_name === tag) {
|
||||
rel = r
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(`Could not find a release for tag ${tag}.`)
|
||||
return
|
||||
}
|
||||
rel = null
|
||||
console.log('RELS:')
|
||||
console.log(rels)
|
||||
for (var r in rels) {
|
||||
console.log('REL:')
|
||||
console.log(r)
|
||||
if (r.tagName === tag) {
|
||||
rel = r
|
||||
break
|
||||
}
|
||||
}
|
||||
if (rel === null) {
|
||||
core.setFailed(`Could not find a release for tag ${tag}.`)
|
||||
return
|
||||
|
@ -101,6 +96,7 @@ jobs:
|
|||
script: |
|
||||
const ver = "${{ github.ref }}".substring(19)
|
||||
const tag = "v" + ver
|
||||
// this is going to fail
|
||||
const rel = await github.repos.getReleaseByTag({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
|
|
Loading…
Reference in New Issue
Block a user