URGENT: Can we create packages dynamically during deployment?

We are in a serious rush to ship a product and very much need help with this problem. We need deployment step running on Octopus Server to produce a package to be used in the following deployment steps. How?

Let me add more context in case there is different way to do it. The problem is caused by Squirrel packages which are NuGet packages with one more wrapping into Squirrel setup bundles. We used to generate Squirrel packages during the build and then Octopus was deploying them as usual. Unfortunately now the content of the package depends on the Environment we deploy to. Basically there is config file inside the package which we need to transform for particular environment, i.e. at deployment time. It is not possible to crack open Squirrel package, extract config file, transform it and pack it back in, so instead we made a script which generates Squirrel packages as deployment steps running on Octopus Server. Now we have newly generated binaries sitting on the server, but how do we make the following steps access those binaries and send them to machines in appropriate roles?
What are our options, considering we have very limited time for implementation?

Thank you!

Hi Konstantine,

No there is no way to do this as the packages are specified and acquired before the deployment steps are executed.

You could possibly script the file transfer to the machines using a script step and then reference the file path where it was transferred to (using output variables) in subsequent steps, but like I said there is no out-of-the-box support for this scenario.

Thank you and best regards,

For the lack of better alternative we use PS script to generate Squirrel packages and store them as Octopus artifacts. Subsequent steps download those artifacts using Octopus API and unpack them to the right location with another PS script.