'Convert .lic file to plain text

I have a .lic file with credentials needed to download a program into a docker container during build time. How do I convert the .lic file to a plain text string that can be stored in a ci/cd platform's (Github Actions) environment variable so I can use it during build and deployment?

I found a solution a while ago that involved converting the .lic file to a .b64, then to a string. Unfortunately, I didn't bookmark the solution and cannot find it again.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source