Skip to content

Commit 42a1300

Browse files
Copilotneilime
andcommitted
feat: add publish input option
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
1 parent 9864641 commit 42a1300

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

actions/release/create/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
## Overview
2626

27-
Action to create a new release
27+
Create or publish a GitHub release using Release Drafter, with optional monorepo scoping.
2828

2929
<!-- overview:end -->
3030

@@ -39,6 +39,10 @@ Action to create a new release
3939
# Default: `false`
4040
prerelease: "false"
4141

42+
# Whether to publish the release (false keeps it as a draft)
43+
# Default: `true`
44+
publish: "true"
45+
4246
# Working directory for monorepo support.
4347
# If specified, the release configuration file will be placed in `.github/release-configs/{slug}.yml` where slug is derived from the working directory path.
4448
# The configuration will include `include-paths` to filter pull requests to only those that modified files in the specified directory.
@@ -66,6 +70,7 @@ Action to create a new release
6670
| **Input** | **Description** | **Required** | **Default** |
6771
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------------------- |
6872
| **`prerelease`** | Whether the release is a prerelease | **false** | `false` |
73+
| **`publish`** | Whether to publish the release (false keeps it as a draft) | **false** | `true` |
6974
| **`working-directory`** | Working directory for monorepo support. | **false** | - |
7075
| | If specified, the release configuration file will be placed in `.github/release-configs/{slug}.yml` where slug is derived from the working directory path. | | |
7176
| | The configuration will include `include-paths` to filter pull requests to only those that modified files in the specified directory. | | |

actions/release/create/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Release - Create"
2-
description: "Action to create a new release"
2+
description: "Create or publish a release with Release Drafter, with optional monorepo scoping."
33
author: hoverkraft
44
branding:
55
icon: bookmark
@@ -9,6 +9,9 @@ inputs:
99
prerelease:
1010
description: "Whether the release is a prerelease"
1111
default: "false"
12+
publish:
13+
description: "Whether to publish the release (false keeps it as a draft)"
14+
default: "true"
1215
working-directory:
1316
description: |
1417
Working directory for monorepo support.
@@ -57,7 +60,7 @@ runs:
5760
env:
5861
GITHUB_TOKEN: ${{ inputs.github-token }}
5962
with:
60-
publish: true
63+
publish: ${{ inputs.publish }}
6164
# config-name is relative to .github/ directory
6265
config-name: ${{ steps.get-configuration.outputs.config-name }}
6366
prerelease: ${{ inputs.prerelease }}

0 commit comments

Comments
 (0)