diff --git a/CHANGELOG.md b/CHANGELOG.md index 8183fdb..ea34c6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`1.9.3...main`][1.9.3...main]. +### Changed + +- Adjusted `github/release/create` to allow creating releases in draft mode ([#214]), by [@localheinz] + ## [`1.9.3`][1.9.3] For a full diff see [`1.9.2...1.9.3`][1.9.2...1.9.3]. @@ -222,6 +226,7 @@ For a full diff see [`1.0.0...main`][1.0.0...main]. [#207]: https://github.com/ergebnis/.github/pull/207 [#208]: https://github.com/ergebnis/.github/pull/208 [#209]: https://github.com/ergebnis/.github/pull/209 +[#214]: https://github.com/ergebnis/.github/pull/214 [@dependabot]: https://github.com/dependabot [@jaymecd]: https://github.com/jaymecd diff --git a/README.md b/README.md index 9046d07..a6a8eba 100644 --- a/README.md +++ b/README.md @@ -511,6 +511,7 @@ For details, see [`actions/github/release/create/action.yaml`](actions/github/re #### Inputs +- `draft`, optional: Whether to create a draft or a published release. - `github-token`, required: The GitHub token of a user with permission to create a release. #### Outputs diff --git a/actions/github/release/create/action.yaml b/actions/github/release/create/action.yaml index 5898cf0..91e8fd6 100644 --- a/actions/github/release/create/action.yaml +++ b/actions/github/release/create/action.yaml @@ -9,6 +9,10 @@ name: "Create a release" description: "Creates a release" inputs: + draft: + description: "Whether to create a draft or a published release" + required: false + default: "false" github-token: description: "GitHub token of a user with permission to create a release" required: true @@ -35,7 +39,7 @@ runs: try { const response = await github.rest.repos.createRelease({ - draft: false, + draft: ${{ fromJSON(inputs.draft) }}, generate_release_notes: true, name: process.env.RELEASE_TAG, owner: context.repo.owner,