Closed dinisnunes1 closed 2 years ago
@dinisnunes1 I will check it tomorrow morning and get back to you
@muhamedzeema I beleive it's this line https://github.com/muhamedzeema/appgallery-deply-action/blob/main/index.js#L130 as the file name is hardcoded.
@muhamedzeema quick fix could be: Option 1
- name: Deploy to Huawei App Gallery
uses: muhamedzeema/appgallery-deply-action@main
with:
client-id: ${{secrets.HUAWEI_CLIENT_ID}}
client-key: ${{secrets.HUAWEI_CLIENT_KEY}}
app-id: ${{secrets.HUAWEI_APP_ID}}
file-extension: "apk"
file-path: "apk/release/app-release.apk"
file-name: "Example-of-my-app-file-name"
submit: true
and then edit the function updateAppFileInfo
function updateAppFileInfo({ fileDestUrl, size, appId, clientId, token, fileName, fileExt }) {
console.log("Update App File Info .... ⌛️");
var binaryName = 'app-release'
if (typeOf(fileName) != 'undefined' && fileName != '') {
binaryName = fileName
}
var data = JSON.stringify({
fileType: "5",
files: [
{
fileName: `${binaryName}.${fileExt}`,
fileDestUrl: fileDestUrl,
size,
},
],
});
Option 2
file-path: "apk/release/app-release.apk"
try to extract between last / char and the .apk text.@dinisnunes1 great ideas, would you like to make those changes and creating a PR for it ?
@muhamedzeema opened the PR with the proposed changes. https://github.com/muhamedzeema/appgallery-deply-action/pull/5
Thank youuuu.
@muhamedzeema can you create a tag for it?
I'm using this action to upload to AppGallery, the apk is uploaded but the filename is always overriden on AppGallery and is always shown as
app-release.apk
Example of the used config