Skip to content

Commit

Permalink
feat: add draft input.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 29, 2024
1 parent 8f90945 commit 6d1b65f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Auto create tags from commit or package.json
- `package-path` The path of the `package.json` file. Default `package.json`.
- `release` Optionally marks this tag as `release`. Set to `true` to enable.
- `prerelease` Optionally marks this release as `prerelease`. Set to `true` to enable.
- `draft` Optionally marks this release as a `draft` release. Set to true to enable.
- `body` An optional body for the release.

## Outputs
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ inputs:
default: ''
required: false

draft:
description: 'Optionally marks this release as a draft release. Set to true to enable.'
default: ''
required: false

prerelease:
description: 'Optionally marks this release as prerelease. Set to true to enable.'
default: ''
Expand Down
6 changes: 3 additions & 3 deletions dist/main.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ async function run(): Promise<void> {
const release = core.getInput('release')
/** Optionally marks this release as `prerelease`. Set to `true` to enable. */
const prerelease = core.getInput('prerelease')
/** Optionally marks this release as a draft release. Set to true to enable. */
const draft = core.getInput('draft')
/** The path of the `package.json` file. Default `package.json`. */
const packagePath = core.getInput('package-path')
// Example: v1.0.0
Expand Down Expand Up @@ -92,6 +94,7 @@ async function run(): Promise<void> {
owner,
repo,
prerelease: !!prerelease,
draft: !!draft,
tag_name: inputVersion,
body: body || ''
})
Expand Down

0 comments on commit 6d1b65f

Please sign in to comment.