Ability to create draft releases
This commit is contained in:
parent
1beeb572c1
commit
e3374ce5b6
@ -24,6 +24,8 @@ inputs:
|
||||
description: 'Promote a prerelease to release. Defaults to "false".'
|
||||
file_glob:
|
||||
description: 'If true the file can be a glob pattern, asset_name is ignored if this is true.'
|
||||
draft:
|
||||
description: 'Mark the release as a draft. Defaults to "false".'
|
||||
prerelease:
|
||||
description: 'Mark the release as a pre-release. Defaults to "false".'
|
||||
make_latest:
|
||||
|
@ -28,6 +28,7 @@ type UpdateReleaseParams = Endpoints[typeof updateRelease]['parameters']
|
||||
|
||||
async function get_release_by_tag(
|
||||
tag: string,
|
||||
draft: boolean,
|
||||
prerelease: boolean,
|
||||
make_latest: boolean,
|
||||
release_name: string,
|
||||
@ -68,6 +69,7 @@ async function get_release_by_tag(
|
||||
return await octokit.request(createRelease, {
|
||||
...repo(),
|
||||
tag_name: tag,
|
||||
draft: draft,
|
||||
prerelease: prerelease,
|
||||
make_latest: make_latest ? 'true' : 'false',
|
||||
name: release_name,
|
||||
@ -209,6 +211,7 @@ async function run(): Promise<void> {
|
||||
const file_glob = core.getInput('file_glob') == 'true' ? true : false
|
||||
const overwrite = core.getInput('overwrite') == 'true' ? true : false
|
||||
const promote = core.getInput('promote') == 'true' ? true : false
|
||||
const draft = core.getInput('draft') == 'true' ? true : false
|
||||
const prerelease = core.getInput('prerelease') == 'true' ? true : false
|
||||
const make_latest = core.getInput('make_latest') != 'false' ? true : false
|
||||
const release_name = core.getInput('release_name')
|
||||
@ -222,6 +225,7 @@ async function run(): Promise<void> {
|
||||
const octokit = github.getOctokit(token)
|
||||
const release = await get_release_by_tag(
|
||||
tag,
|
||||
draft,
|
||||
prerelease,
|
||||
make_latest,
|
||||
release_name,
|
||||
|
Loading…
Reference in New Issue
Block a user