From 5d8746ca9d67ed139b8a5cfbc6943674cbfe688e Mon Sep 17 00:00:00 2001 From: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> Date: Fri, 23 Jan 2026 17:59:19 +0100 Subject: [PATCH 1/2] fix: allow the output of the action to be multiline --- action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 5324ffa..7d0479d 100644 --- a/action.yml +++ b/action.yml @@ -87,5 +87,8 @@ runs: COMMAND: ${{ inputs.command }} ARGS: ${{ inputs.args }} run: | - OUTPUT=$(version "$COMMAND" $ARGS) - echo "version=$OUTPUT" >> $GITHUB_OUTPUT + { + echo "version<> "$GITHUB_OUTPUT" From 5a40b6e2cc3d6b90c2e27ff009e7d3a76c9b8c88 Mon Sep 17 00:00:00 2001 From: kvanzuijlen Date: Fri, 23 Jan 2026 16:59:52 +0000 Subject: [PATCH 2/2] Prettier --- action.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/action.yml b/action.yml index 7d0479d..fe0bc58 100644 --- a/action.yml +++ b/action.yml @@ -1,18 +1,18 @@ -name: 'Version' -description: 'A tool to handle version numbers' +name: "Version" +description: "A tool to handle version numbers" inputs: version: - description: 'Explicit version to use (e.g. v0.1.5). Defaults to the action tag.' + description: "Explicit version to use (e.g. v0.1.5). Defaults to the action tag." required: false command: - description: 'Command to run (bump or latest)' + description: "Command to run (bump or latest)" required: true args: - description: 'Arguments to pass to the command' + description: "Arguments to pass to the command" required: true outputs: version: - description: 'The output of the command' + description: "The output of the command" value: ${{ steps.version-cli.outputs.version }} runs: using: "composite" @@ -26,7 +26,7 @@ runs: run: | # If input is empty, fall back to the action's pinned tag (e.g., v0.1.5) VERSION="${INPUT_VERSION:-$ACTION_REF}" - + if [[ "$VERSION" =~ ^[0-9a-f]{40}$ ]]; then echo "::error::When pinning by SHA, you must explicitly provide the 'version' input." echo "Please update your workflow:" @@ -35,12 +35,12 @@ runs: echo " version: v0.1.5 # <--- Required" exit 1 fi - + if [ -z "$VERSION" ]; then echo "Error: Could not determine version. Please pin the action or provide a version input." exit 1 fi - + echo "Resolved version: $VERSION" # --- 2. MAP OS & ARCH --- @@ -66,14 +66,14 @@ runs: # --- 3. CONSTRUCT URL --- FILENAME="version_${OS_TYPE}_${ARCH_TYPE}.tar.gz" URL="https://github.com/version-cli/version/releases/download/${VERSION}/${FILENAME}" - + echo "Downloading from: $URL" # --- 4. DOWNLOAD & INSTALL --- curl -sLf -H "Authorization: Bearer $GITHUB_TOKEN" "$URL" -o "version.tar.gz" mkdir -p "$HOME/.local/bin" - + tar -xzf "version.tar.gz" -C "$HOME/.local/bin" "$BINARY_NAME" # --- 5. UPDATE PATH ---