How about using
@Peter Simpson 's suggestion combined with CustomBuildActions (or IDE comment links)? Haven't given it much thought, just an idea. (Could be a bad one

)
Edit: I mean, CBAs or IDE comment links to copy the 'real' secrets file or a dummy one to Files. You'd still have to remember to click the appropriate link before exporting.