License from secrets is working but not from environment variable

Hi, I’m running unity application build jobs on self-hosted github runner. I am saving license data in github secrets and it works fine. However, this license is binded with machine and with multiple runners I cannot store license in the secrets anymore. However, I am storing license in environment variable and returning it with echo step like this

- name: get license data from file
        id: unity_license
        run: |
          echo ::set-output name=host::$HOSTNAME
          echo -e "::set-output name=file::$UNITY_LICENSE"
- uses: game-ci/unity-builder@v2
      UNITY_LICENSE: ${{ steps.unity_license.outputs.file }}


But doing so doesn’t work and gives invalid license error. Same content in the secrets works completely fine. I’ve lot of things but nothing seems to work with this approach. Can you please help me figure out what I’m doing wrong?

Your workflow snippet does not include the part where you set $UNITY_LICENSE. Are you sure that ${{ steps.unity_license.outputs.file }} is actually set properly?

Yes, $UNITY_LICENSE is configured and value exists there. However, it is long data. I’m facing problem with multiple line data from $UNITY_LICENSE. It is xml file including licensing stuff. Also is there any character limit on environment variables set in github actions bcoz I haven’t encountered such thing in docs.

Sorry, I wasn’t asking for the content of the license file, just the workflow code that sets the environment variable. IIRC, then there are issues with setting multi-line outputs, maybe also with setting environment variables. I would need to take a look at the code that you use to set it. The documentation has an example of how to set an environment variable using environment files for the multi-line case: Multiline strings