I went through this, and as far as the process goes I did that.
But I when I installed the app from play store I am not able to sign in using the
google sign in
Release APK and debug APK has different SHA1 and different API keys for google services. Both of them must be added in Firebase Console -> Project settings. Then download
google-services.json from here, add it to project and recompile with release keystore using option "Build signed APK". That should work