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

ArtifactoryNpm@2 'pack and publish' package within a monorepo of yarn workspaces? #466

Open
ghost opened this issue Dec 15, 2023 · 1 comment
Labels
question Further information is requested

Comments

@ghost
Copy link

ghost commented Dec 15, 2023

(Where is the documentation for Azure DevOps "ArtifactoryNpm@2" task?)

In a Yarn workspaces monorepo, the root workspace is necessarily private and not publishable.

I have:

  • example/package.json (workspace)
  • lib/package.json (workspace)
  • package.json (root workspace)
  • yarn.lock

as a CI bash script, I could just run yarn workspace @my/lib npm publish but the CI agent doesn't have the credentials there. I assume we need to use the specialized ArtifactoryNpm@2 yaml pipeline task, but I can't find documentation/examples/discussions/bugs about how this should be accomplished. I'm not even sure this is the right github repo to ask about this. Any help, please?

@ghost ghost added the question Further information is requested label Dec 15, 2023
@JasonKleban
Copy link

This kinda works, except the guess of arguments: '--tag next' is ineffective

- task: ArtifactoryNpm@2
  inputs:
    command: 'pack and publish'
    artifactoryService: 'Artifactory'
    workingFolder: "lib/"
    arguments: '--tag next'
    targetRepo: 'jfroggy'
  displayName: Publish Next

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

No branches or pull requests

1 participant