Skip to content

Commit 865ef49

Browse files
committed
fixup
Signed-off-by: Rajat Jindal <[email protected]>
1 parent b9e9807 commit 865ef49

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ inputs:
77
description: 'the plugin template file'
88
upload_checksums:
99
required: false
10-
default: false
1110
description: 'if enabled, uploads a checksums-<tagname>.txt file to release'
1211
github_token:
1312
required: false

dist/index.js

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/release.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ async function run(): Promise<void> {
100100
const checksums: string[] = []
101101
for (const pair of releaseMap) {
102102
const [key, value] = pair
103+
if (!key.endsWith('.tar.gz')) {
104+
continue
105+
}
106+
103107
checksums.push(`${value} ${getFilename(key)}`)
104108
}
105109

@@ -162,7 +166,12 @@ function getReleaseTagName(): string {
162166
}
163167

164168
function getFilename(url: string): string {
165-
return url
169+
const name = url.split('/').pop()
170+
if (name) {
171+
return name
172+
}
173+
174+
throw new Error('failed to find filename from asset url')
166175
}
167176

168177
run()

0 commit comments

Comments
 (0)