The basic documentation to understand the principles is in the Ionic docs.
The first step is creating a key to sign the file to upload to the Play Store:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
The second step is setting your app to use this certificate.
Create a build.json file to put in your main folder: