1
0

Compare commits

...

5 Commits

Author SHA1 Message Date
Stephan
7bc1195651 exp 2022-03-18 18:49:47 +01:00
Stephan
786c441206 exp 2022-03-18 18:48:12 +01:00
Stephan
558f12143c exp 2022-03-18 18:45:23 +01:00
Stephan
2cd8137eeb exp 2022-03-18 18:39:54 +01:00
Stephan
77f77c3e8b exp 2022-03-18 18:37:35 +01:00
2 changed files with 4 additions and 6 deletions

View File

@ -48,8 +48,7 @@ module.exports = /*async*/ ({github, context, core}) => {
core.setFailed(`Could not find a GitHub release for tag '${tag}'.`)
return
}
console.log(release)
if (release.draft) {
if (!release.draft) {
core.setFailed(`GitHub release for tag '${tag}' is already published.`)
return
}
@ -115,7 +114,6 @@ module.exports = /*async*/ ({github, context, core}) => {
owner: context.repo.owner,
repo: context.repo.repo
})
console.log(releases)
const release = firstOrDefault(releases.data, (x) => x.tag_name == tag)
return release
}

View File

@ -36,11 +36,11 @@ jobs:
await script.validateRelease()
- name: Finalize GitHub release and milestone
if: github.event.inputs.dryrun == false
if: ${{ github.event.inputs.dryrun == 'false' }}
uses: actions/github-script@v5
with:
script: |
const scriptf = require('./.github/workflows/publish-release.js')
const script = scriptf({github, context, core})
//await script.publishRelease()
//await script.closeMilestone()
await script.publishRelease()
await script.closeMilestone()