Skip to content

Commit

Permalink
Expose --dry-run via input.dry_run (#71)
Browse files Browse the repository at this point in the history
Fixes #70
  • Loading branch information
rymndhng authored Apr 15, 2022
1 parent 12ca02e commit 177dbe7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Allowed values of `bump_version_scheme`:

For stability, we recommend pinning the version of the action. See [Releases](https://github.com/rymndhng/release-on-push-action/releases).

See [action.yml](./action.yml) for the full list of options.

## FAQ

### Can I skip creation of a release?
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ inputs:
description: "When set to 'true', uses Github's Generated Release Notes instead of this plugin's release notes"
required: false
default: "false"
dry_run:
description: "When set to 'true', will compute the next tag, but will not create a release."
required: false
default: "false"
outputs:
tag_name:
description: 'Tag of released version'
Expand Down
3 changes: 2 additions & 1 deletion src/release_on_push_action/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
(if (input-strategy-set?)
(getenv-or-throw "INPUT_STRATEGY")
(throw ex)))))
:dry-run (contains? (set args) "--dry-run")})
:dry-run (or (Boolean/parseBoolean (System/getenv "INPUT_DRY_RUN"))
(contains? (set args) "--dry-run"))})

;; -- Version Bumping Logic ---------------------------------------------------
(defn fetch-related-data [context]
Expand Down

0 comments on commit 177dbe7

Please sign in to comment.