Skip to content

Commit

Permalink
fix: special URL format for latest
Browse files Browse the repository at this point in the history
  • Loading branch information
willgeorgetaylor committed Dec 28, 2023
1 parent 770147f commit c384c34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -20,7 +20,8 @@ function enumerateInputs(): Record<string, string> {
}

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}`

Check failure on line 23 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Insert `⏎···`
return `${BASE_RELEASE_URL}download/${version}/junit-reducer_${suffix}`
}

/**
Expand Down

0 comments on commit c384c34

Please sign in to comment.