Skip to content

Commit

Permalink
feat: add support for draft releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin-de-Jong committed Aug 31, 2023
1 parent e55ef7f commit b691f1f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
| `versioning` | NO | [Versioning strategy](#versioning-strategies) to apply. MUST be one of `semver` or `calver`. Default: `semver` |
| `release-notes` | NO | Path towards a file containing the release notes to include in the GitHub release (Markdown format recommended) |
| `increment-type` | NO | Enforce a specific increment type, please refer to the [Versioning Strategies](./docs/versioning-strategies.md) for more details |
| `draft` | NO | Create a GitHub Release in `draft` status |

## Outputs

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ inputs:
description: Versioning scheme to apply
required: false
default: 'semver'

draft:
description: 'Draft GitHub Release instead of publishing it'
required: false
default: false

release-notes:
description: 'External Release Notes file to include in the GitHub Release'
Expand Down
2 changes: 1 addition & 1 deletion lib/get/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/releasing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function createRelease(version: versioning.Version, body: string):
...github.context.repo,
name: version.toString(),
body,
draft: false,
draft: core.getBooleanInput("draft"),
prerelease: version instanceof SemVer ? version.preRelease !== undefined : false,
make_latest: branching.getBranch().type === "default" ? "true" : "false",
tag_name: version.toString(),
Expand Down

0 comments on commit b691f1f

Please sign in to comment.