From c384c3406386c782f002f7c456c17353c55ee32a Mon Sep 17 00:00:00 2001 From: Will Taylor Date: Thu, 28 Dec 2023 23:22:49 +0000 Subject: [PATCH] fix: special URL format for latest --- src/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 7df5cd1..b99786d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,7 @@ import * as tc from '@actions/tool-cache' import * as exec from '@actions/exec' const BASE_RELEASE_URL = - 'https://github.com/willgeorgetaylor/junit-reducer/releases/download/' + 'https://github.com/willgeorgetaylor/junit-reducer/releases/' // We're doing it this way so we can passthrough // inputs without needing to extract them individually. @@ -20,7 +20,8 @@ function enumerateInputs(): Record { } function formatReleaseUrl(suffix: string, version: string): string { - return `${BASE_RELEASE_URL}${version}/junit-reducer_${suffix}` + if (version === 'latest') return `${BASE_RELEASE_URL}latest/download/junit-reducer_${suffix}` + return `${BASE_RELEASE_URL}download/${version}/junit-reducer_${suffix}` } /**