Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPM config on Windows runners #618

Open
lukas-prodviz opened this issue Jan 3, 2024 · 2 comments
Open

UPM config on Windows runners #618

lukas-prodviz opened this issue Jan 3, 2024 · 2 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@lukas-prodviz
Copy link

lukas-prodviz commented Jan 3, 2024

Hello,

According to the documentation, UPM authentication on Ubuntu is configured by creating the upmconfig file under /home/runner/work/_temp/_github_home.

In which directory should this file be placed on Windows runners?

I already tried to use $HOME and change the Ubuntu example from the documentation as follows:

  - name: Create .upmconfig.toml UPM authentication file
    env:
      npm_token: ${{ secrets.NPM_TOKEN }}
    run: |
      cd $HOME
      echo "[npmAuth.`"https://upm.example.com`"]" > .upmconfig.toml
      echo "_auth = `"$Env:npm_token`"" >> .upmconfig.toml
      echo "alwaysAuth = true" >> .upmconfig.toml

But this still gives me the message "... failed because it lacks valid authentication credentials" when the package manager tries to resolve the dependencies, whereas on Ubuntu everything works as expected.

@davidmfinol davidmfinol added question Further information is requested help wanted Extra attention is needed labels Jan 8, 2024
@GabLeRoux
Copy link
Member

GabLeRoux commented Mar 14, 2024

I think this could be related:
game-ci/unity-test-runner#261

It's not for the builder project, but it does work with the .upmconfig.toml. We might need to do similar logic for the builder project.

@nvandessel
Copy link

nvandessel commented Mar 14, 2024

Unfortunately for the test-runner, package-mode has the caveat of only working on Linux runners due to the dependency on jq, issue being tracked here: game-ci/unity-test-runner#224

So that means that I haven't been able to confirm it working on a Windows machine.

One possible option is to try a different location for the toml that is accepted by Unity. See valid locations here.
So instead of: cd $HOME, it might be: cd C:\ProgramData\Unity\config\

*Note that my example location requires the file to be named upmconfig.toml without the prepended .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants