Problem
Action is always publishing the app even with submit set to false. I can check the logs and see the successfully submitted 🎉🎉🎉🎉🎉🎉 message if I set submit to false or true.
Solution
Replace the if condition if (submit) {} (is always being executed) with:
if(submit === 'true'){
//submit code here
}
Tests
After some tests and reading the docs, the input type will collect the submit option as string (and not boolean as it is described in the readme file). So the if condition if(submit){} is always being executed.
Problem Action is always publishing the app even with
submit
set tofalse
. I can check the logs and see thesuccessfully submitted 🎉🎉🎉🎉🎉🎉
message if I set submit tofalse
ortrue
.Issue: https://github.com/muhamedzeema/appgallery-deply-action/issues/6
Solution Replace the if condition
if (submit) {}
(is always being executed) with:Tests After some tests and reading the docs, the
input
type will collect thesubmit
option as string (and notboolean
as it is described in the readme file). So the if conditionif(submit){}
is always being executed.A quick test doing a
console.log(typeof submit)
retunedstring
. So the solution is to replace the if condition here https://github.com/muhamedzeema/appgallery-deply-action/blob/main/index.js#L190 with:Working version with
submit: false
(only upload)Working version with
submit: true
(upload and submit)