This is simple. There will be many ways you can achieve this.
Simplest way is a bash script.
Step 1.
Create a file "execute_build.sh" in the same directory as your application. It can be anywhere but if its elsewhere you need to "cd" to that directory which is a long way.
Let's say we have execute_build.sh in same level as pubspec.yaml.
Now. Inside that simple add this line.
flutter build apk --release
This line can be any release command.
After that line on the next one this bellow line.
say "I am done"
Note this would work if you are on Mac os.
But you can add your own system command based from here: In a bash script/command how can I make a PC beep noise, or play a sound file?
Since Bash Script execute line by line this second command will only get executed while the above is finished.
So Second Line Can be anything.
It can be a http request using grep to a hook in Slack, Teams.
It can be another python or command that does something else.
To execute this bash script all you have to do is
Write bash execute_build.sh
in the terminal of the IDE or VS Code.