In either case it’s legal to sell your game. The problem with games made with BGE/UPBGE is that they directly interface with Blender and the Blenderplayer being GPL - thus games produced from this is also GPL. You can package and sell your game, but legally I think anyone could buy your game and freely redistribute it (Because of the Blenderplayer).
That is not the case because of the way Armory works, as the end product (game) is Zlib licensed, and not GPL - The reason this can work is because Armory works by sort of porting/translating your entire blender scenes from Blender and the python API’s to Kha/Iron/Haxe/Krom. At your end product made with Armory, there’s no traces of the Blender API’s or Blender source code. It is due to the same reasons that EEVEE is GPL Licensed, but Cycles is Apache Licensed.
But in either case, yes it is legal to sell a game on steam made with Armory and BGE/UPBGE - But:
-
It is also legal to buy a BGE steam game, pirate the game, release the source code and do with it what you want. All within the legal limits of GPL. As per GPL, people can actually request the source code for your stuff (To a certain degree, depending on how you bundle your stuff - There are ways to circumvent that: https://blenderartists.org/t/sell-blender-game-on-steam/637025).
-
You are NOT legally required to do this with a closed-sourced Armory game. The Zlib license ensures that you can sell/distribute/close-source your products the same way as with Unity/Unreal etc.
It is described here (for Bge): https://docs.blender.org/manual/en/latest/game_engine/licensing.html