Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update license used for PRs from forks
Note that originally, this PR attempted to use variables, not secrets, for the fallback license. The documentation implies that these should be available, but in fact, they're not. See, for example, https://github.com/orgs/community/discussions/44322 Given an .ulf file, it can be converted to the format here using: cat foo.ulf | sed -e 's/"/\\"/g' -e ':a;N;$!ba;s/\n/\\n/g' On a Mac, use gsed instead of sed ==== OLD COMMIT MESSAGE ==== Get personal license from Github vars Action v4 requires always passing the username and password. We'll get this from a Github var instead of embedding it To set these variables, follow the instructions at https://game.ci/docs/github/activation/#personal-license to set up Unity Hub. Then, save the following environment variables at https://github.com/icosa-foundation/open-brush/settings/variables/actions: FALLBACK_UNITY_EMAIL FALLBACK_UNITY_PASSWORD FALLBACK_UNITY_LICENSE Note that for the license, you need to do two search and replaces first: 1. s/"/\\"/g # Replace all instances of " with \" 2. s/\r/\\n/g # Replace all newlines with a string of \n After this commit, PRs from forks will build successfully using the FALLBACK_* credentials. Users who wish to build on their fork, using the "[CI BUILD]" option, will need to set these environment variables at their settings/variables/actions link. The ones from Icosa will only be used when building as part of a PR, not as part of a local commit. ==== END OLD COMMIT MESSAGE ==== ==== ORIGINAL CHANGE ==== + UNITY_EMAIL: ${{ fromJSON(format('["{0}", "{1}"]', vars.FALLBACK_UNITY_EMAIL, secrets.UNITY_EMAIL))[secrets.UNITY_SERIAL != null] }} + UNITY_PASSWORD: ${{ fromJSON(format('["{0}", "{1}"]', vars.FALLBACK_UNITY_PASSWORD, secrets.UNITY_PASSWORD))[secrets.UNITY_SERIAL != null] }} + UNITY_LICENSE: ${{ fromJSON(format('["{0}", null]', vars.FALLBACK_UNITY_LICENSE))[secrets.UNITY_SERIAL != null] }} ==== END ORIGINAL CHANGE ====
- Loading branch information