Skip to content

Commit

Permalink
replace unsigned when exist
Browse files Browse the repository at this point in the history
  • Loading branch information
PuerNya committed Oct 11, 2023
1 parent d04c2a1 commit 911c395
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/signing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export async function signApkFile(
core.debug(`Found 'apksigner' @ ${apkSigner}`);

// apksigner sign --ks my-release-key.jks --out my-app-release.apk my-app-unsigned-aligned.apk
const signedApkFile = apkFile.replace('.apk', '-signed.apk');
let needReplace = '.apk'
if ( apkFile.endsWith( '-unsigned.apk' ) ) needReplace = '-unsigned.apk'
const signedApkFile = apkFile.replace(needReplace, '-signed.apk');
const args = [
'sign',
'--ks', signingKeyFile,
Expand Down

0 comments on commit 911c395

Please sign in to comment.