Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add an option to publish a .tgz previously packed with `npm pack` #4958
I use VSTS to build and publish a NPM package.
I think it would be great if we could choose either to publish a folder (and let the
As a temporary fix, I currently extract the tarball and then call the NPM publish task with the
Here are a few suggestions:
The key part of my scenario is that I have two different pipelines: a build definition which creates the package (with the
Create the package
Copy it in the build artifacts
I cannot use the preconfigured publish command
I cannot use the custom command
The minimatch pattern is not resolved, and I cannot select the external npm registry.
My temporary fix
So, at the moment, I can only extract the package and then publish it.
Hope it's clearer now!
In the near term, you should know that NPM 5+ doesn't support publishing a .tgz so be careful upgrading. In fact, I would recommend using the NPM tool installer in your release definition to ensure that you're using npm 3/4.x while the NPM issue gets resolved... hopefully.
Just to add I've got the same issue, in our instance we're building (packing) within a docker container but it's necessary (on-top of being a good idea) to publish from TFS because we need to authenticate with the registry. I'm going to use your workaround @asiffermann
Publishing tarballs is still very much a documented feature. So I think it's safe to add support for publishing .tgz files directly in the NPM task.
I don't see any NPM installer task. I see a Node tool installer task, and maybe that's loosely coupled with NPM, but it's not clear to me which version of Node.js to install in order to get a particular version of NPM.
My attempt at a workaround for this is to use a PowerShell task to find the name of the file to publish (since the version changes for each release) and set that filename to a variable. Then my next release task is the NPM task with the 'custom' command set to