name: vociferate/run-vociferate-binary description: Execute vociferate through a released binary. inputs: binary-path: description: Path to the vociferate binary. required: true root: description: Repository root to pass to vociferate. required: true version-file: description: Optional version file path. required: false default: '' version-pattern: description: Optional version pattern. required: false default: '' changelog: description: Optional changelog path. required: false default: '' version: description: Optional version argument. required: false default: '' date: description: Optional date argument. required: false default: '' recommend: description: Whether to run vociferate with --recommend. required: false default: 'false' print-unreleased: description: Whether to print the Unreleased body. required: false default: 'false' print-release-notes: description: Whether to print the release notes section for version. required: false default: 'false' outputs: stdout: description: Captured stdout from the vociferate invocation. value: ${{ steps.run.outputs.stdout }} runs: using: composite steps: - name: Run binary id: run shell: bash env: VOCIFERATE_BIN: ${{ inputs.binary-path }} ROOT: ${{ inputs.root }} VERSION_FILE: ${{ inputs.version-file }} VERSION_PATTERN: ${{ inputs.version-pattern }} CHANGELOG: ${{ inputs.changelog }} VERSION: ${{ inputs.version }} DATE: ${{ inputs.date }} RECOMMEND: ${{ inputs.recommend }} PRINT_UNRELEASED: ${{ inputs.print-unreleased }} PRINT_RELEASE_NOTES: ${{ inputs.print-release-notes }} VOCIFERATE_REPOSITORY_URL: ${{ vars.VOCIFERATE_REPOSITORY_URL }} run: | set -euo pipefail command=("$VOCIFERATE_BIN" --root "$ROOT") if [[ -n "$VERSION_FILE" ]]; then command+=(--version-file "$VERSION_FILE") fi if [[ -n "$VERSION_PATTERN" ]]; then command+=(--version-pattern "$VERSION_PATTERN") fi if [[ -n "$CHANGELOG" ]]; then command+=(--changelog "$CHANGELOG") fi if [[ -n "$VERSION" ]]; then command+=(--version "$VERSION") fi if [[ -n "$DATE" ]]; then command+=(--date "$DATE") fi if [[ "$RECOMMEND" == 'true' ]]; then command+=(--recommend) fi if [[ "$PRINT_UNRELEASED" == 'true' ]]; then command+=(--print-unreleased) fi if [[ "$PRINT_RELEASE_NOTES" == 'true' ]]; then command+=(--print-release-notes) fi stdout_file="$(mktemp)" trap 'rm -f "$stdout_file"' EXIT "${command[@]}" > "$stdout_file" delimiter="EOF_STDOUT" printf 'stdout<<%s\n' "$delimiter" >> "$GITHUB_OUTPUT" cat "$stdout_file" >> "$GITHUB_OUTPUT" printf '%s\n' "$delimiter" >> "$GITHUB_OUTPUT"