Thank you for getting in touch. Unfortunately we don't have anything built in to do replacements inside archives. However, one of the options below may work:
1) Deploy the package using a Deploy Package Command, which will extract the dacpac zip
2) Run a script that does the replacements and re-creates the dacpac
3) Deploy the DacPac
1) Deploy the package using the transfer package command, which will put the dacpac onto the file system
2) Run a script that looks inside the archive, extract the sql scripts one at a time, do any replacements and then put them back into the archive
3) Deploy the dacpac
For step 2 in those scenarios, you can use a PowerShell script (or C#/F# script). For powershell, you have a $OctopusParameters hash that contains all the variables configured in octopus scoped to that environment/step/etc (including library variables). Use this to easily see what it actually contains. You can loop over the keys in that hash, and check the sql file to see if a replacement needs to be made. If so, get the value from the hash and replace it in the sql.