Skip to content

Commit 72e76cf

Browse files
author
Guven Karanfil
committed
validate invalid file extension
1 parent 62e313f commit 72e76cf

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

dist/index.js

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

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

src/main.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ export async function run(): Promise<void> {
2222
const appPath = core.getInput('appPath')
2323
const message = core.getInput('message')
2424

25-
const validExtensions = ['.ipa', '.apk', '.zip', '.aab']
25+
const validExtensions = ['.ipa', '.apk', '.aab', '.zip']
2626
const fileExtension = appPath.slice(appPath.lastIndexOf('.')).toLowerCase()
2727
if (!validExtensions.includes(fileExtension)) {
2828
core.setFailed(
29-
`Invalid file extension: ${appPath}. For Android, use .apk. For iOS, use .ipa.`
29+
`Invalid file extension for '${appPath}'. Please use one of the following:\n` +
30+
`- Android: .apk or .aab\n` +
31+
`- iOS: .ipa\n` +
32+
`- Both: .zip`
3033
)
3134
return
3235
}

0 commit comments

Comments
 (0)