Do you have a build machine with the same architecture as the secure machine? @dilumaluthge and I made a package for this use case, and we use it for maintaining our Julia environment on an air-gapped system.
I wrote up a description here on the Julia Discourse, so even if this isn’t the right solution for you, the linked posts underneath the question might be helpful.