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: |
|
script: |
|
||||||
const ver = "${{ github.ref }}".substring(19)
|
const ver = "${{ github.ref }}".substring(19)
|
||||||
const tag = "v" + ver
|
const tag = "v" + ver
|
||||||
var rel
|
var rel = null
|
||||||
var rels
|
|
||||||
try {
|
try {
|
||||||
rels = await github.repos.listReleases({
|
// this does *not* return draft releases
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo
|
|
||||||
})
|
|
||||||
//rel = await github.repos.getReleaseByTag({
|
//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
|
||||||
//})
|
//})
|
||||||
|
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) {
|
catch (error) {
|
||||||
core.setFailed(`Could not find a release for tag ${tag}.`)
|
core.setFailed(`Could not find a release for tag ${tag}.`)
|
||||||
return
|
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) {
|
if (rel === null) {
|
||||||
core.setFailed(`Could not find a release for tag ${tag}.`)
|
core.setFailed(`Could not find a release for tag ${tag}.`)
|
||||||
return
|
return
|
||||||
|
@ -101,6 +96,7 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
const ver = "${{ github.ref }}".substring(19)
|
const ver = "${{ github.ref }}".substring(19)
|
||||||
const tag = "v" + ver
|
const tag = "v" + ver
|
||||||
|
// this is going to fail
|
||||||
const 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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user