-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Add support for Scoped Registries #261
Add support for Scoped Registries #261
Conversation
@webbertakken @GabLeRoux @davidmfinol Hey guys, wasn't sure who to tag so... :) I'd like to try and support as many UPM registries types as possible. The only one I've personally used is Verdaccio (which I believe OpenUPM is also using as their backend registry), however I'd like to not be limited. In addition the authentication method with UPM registries is largely dependent on how you have decided to set it up as a user/organization. Ultimately the most important thing is that Unity requires a Curious to get your thoughts on this! Also, shoutout to @trudeaua21 for all the work you put into supporting package testing! |
Also, open to adjust the existing implementation, I didn't want to bloat things too much so just duplicated the existing test package in it's directory and renamed it to be explicit that it was for testing dependencies. I used a popular OpenUPM package UniTask as a dependency to force the test Project to resolve it. You can see it successfully do that in the logs of this run here. |
133eae6
to
2e6dfa5
Compare
2e6dfa5
to
70d5bdc
Compare
I've implemented the solution I discussed above, supplying the registry token via a GitHub Actions Secret and creating the Looking forward to getting some feedback! |
Discovered an issue in how multiple scopes were being parsed and injected into the Also added an additional job to the |
@webbertakken or @GabLeRoux, would love to get some feedback on this! 🙏 |
Wow, that is some amazing work here. I've only did a first pass, read descriptions and comments and gave a quick look at the modified files and it looks good so far. Thanks for this great contribution! I've added a reminder to go in details through the provided code tonight. I personally don't own a package for Unity at this time, nor one that would have external dependencies, but I do understand the feature request so I'll dig into this and add a review asap 👍 Nice one 🙌 |
Changes
scopedRegistryUrl
andregistryScopes
.UPM_REGISTRY_TOKEN
as an environment variable.packageMode
istrue
and we test a Unity package.scopedRegistryUrl
is provided, validation occurs to ensureregistryScopes
are supplied as wellmanifest.json
(existing functionality)manifest.json
we also add the scoped registry and its scopesUPM_REGISTRY_TOKEN
is found, then a.upmconfig.toml
is created at the$HOME
directoryRelated Issues
Related PRs
Successful Workflow Run Link
PRs don't have access to secrets so you will need to provide a link to a successful run
of the workflows from your own repo.
Checklist
in the documentation repo)
com.dependencyexample.testpackage
to the same directory as the existing package. By default it is setup to have a dependency from a popular OpenUPM package UniTask, and is tested via the added jobtestPackageRunnerWithScopeRegistry
.