Skip to content

Commit

Permalink
feat: add additional args to release job (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Ribeiro <[email protected]>

Co-authored-by: Eric Ribeiro <[email protected]>
  • Loading branch information
KyleTryon and EricRibeiro committed Dec 22, 2022
1 parent 8d66673 commit 64de150
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/jobs/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ parameters:
type: string
default: "2.3.0"
description: Specify the full semver versioned tag to use for the GitHub CLI installation.
additional_args:
type: string
default: ""
description: |
Specify additional arguments to pass to the GitHub CLI command.
See the GitHub CLI documentation for a list of available arguments: https://cli.github.com/manual/gh_release_create
hostname:
type: string
default: "github.com"
Expand All @@ -60,4 +66,5 @@ steps:
PARAM_GH_PRERELEASE: <<parameters.prerelease>>
PARAM_GH_FILES: <<parameters.files>>
PARAM_GH_TITLE: <<parameters.title>>
PARAM_GH_ARGS: <<parameters.additional_args>>
command: <<include(scripts/release.sh)>>
7 changes: 6 additions & 1 deletion src/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ fi
if [ -n "$PARAM_GH_FILES" ]; then
set -- "$@" " $PARAM_GH_FILES"
fi

set -- "$@" --repo "$(git config --get remote.origin.url)"

gh release create "$PARAM_GH_TAG" "$@"
# shellcheck disable=SC2086
gh release create \
"$PARAM_GH_TAG" \
$PARAM_GH_ARGS \
"$@"

0 comments on commit 64de150

Please sign in to comment.